diff options
author | Pjotr Prins | 2015-03-09 08:43:12 +0300 |
---|---|---|
committer | Pjotr Prins | 2015-03-09 08:43:12 +0300 |
commit | 9485cbbad2596b3105ad995e15ac3cb3dca6615d (patch) | |
tree | 72386c8b1e8cd6980df60bb31b7b0aaf28204556 /wqflask | |
parent | 11856132296916f7788437681bea9a2c71fe1e50 (diff) | |
download | genenetwork2-9485cbbad2596b3105ad995e15ac3cb3dca6615d.tar.gz |
Parse new phenotype format
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/my_pylmm/pyLMM/runlmm.py | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/wqflask/wqflask/my_pylmm/pyLMM/runlmm.py b/wqflask/wqflask/my_pylmm/pyLMM/runlmm.py index 4a640d6d..27afd6f4 100644 --- a/wqflask/wqflask/my_pylmm/pyLMM/runlmm.py +++ b/wqflask/wqflask/my_pylmm/pyLMM/runlmm.py @@ -41,7 +41,9 @@ parser = OptionParser(usage=usage) # parser.add_option("-f", "--file", dest="input file", # help="In", metavar="FILE") parser.add_option("--kinship",dest="kinship", - help="Kinship file format") + help="Kinship file format 1.0") +parser.add_option("--pheno",dest="pheno", + help="Phenotype file format 1.0") parser.add_option("-q", "--quiet", action="store_false", dest="verbose", default=True, help="don't print status messages to stdout") @@ -67,3 +69,19 @@ if options.kinship: ns = np.genfromtxt(row[1:]) K1.append(ns) # <--- slow K = np.array(K1) + +if options.pheno: + Y1 = [] + print options.pheno + with open(options.pheno,'r') as tsvin: + assert(tsvin.readline().strip() == "# Phenotype format version 1.0") + tsvin.readline() + tsvin.readline() + tsvin.readline() + tsv = csv.reader(tsvin, delimiter='\t') + for row in tsv: + ns = np.genfromtxt(row[1:]) + Y1.append(ns) # <--- slow + Y = np.array(Y1) + +print Y |