aboutsummaryrefslogtreecommitdiff
path: root/wqflask/maintenance
diff options
context:
space:
mode:
authorLei Yan2014-02-22 21:41:31 -0600
committerLei Yan2014-02-22 21:41:31 -0600
commit30889320c00673660d194fc03b912d1832e5a6ed (patch)
tree1f505fe0e73782c2b7249341d30dac63a89bc070 /wqflask/maintenance
parent1014d09efced9c36274aec0d2486469648569721 (diff)
downloadgenenetwork2-30889320c00673660d194fc03b912d1832e5a6ed.tar.gz
On branch master
Diffstat (limited to 'wqflask/maintenance')
-rw-r--r--wqflask/maintenance/dataset/datasampledir/load_genotypes/config.ini1
-rw-r--r--wqflask/maintenance/dataset/load_genotypes.py9
2 files changed, 9 insertions, 1 deletions
diff --git a/wqflask/maintenance/dataset/datasampledir/load_genotypes/config.ini b/wqflask/maintenance/dataset/datasampledir/load_genotypes/config.ini
index 1f977cf8..6f2adbd2 100644
--- a/wqflask/maintenance/dataset/datasampledir/load_genotypes/config.ini
+++ b/wqflask/maintenance/dataset/datasampledir/load_genotypes/config.ini
@@ -1,4 +1,5 @@
[config]
+speciesid = 1
genofile = datasampledir/load_genotypes/sample.geno
U = x
H = 0
diff --git a/wqflask/maintenance/dataset/load_genotypes.py b/wqflask/maintenance/dataset/load_genotypes.py
index 204fb926..0ae2c5cd 100644
--- a/wqflask/maintenance/dataset/load_genotypes.py
+++ b/wqflask/maintenance/dataset/load_genotypes.py
@@ -2,6 +2,7 @@ import sys
import re
import utilities
+import datastructure
def main(argv):
# config
@@ -10,6 +11,7 @@ def main(argv):
for item in config.items('config'):
print "\t%s" % (str(item))
# variables
+ speciesid = config.get('config', 'speciesid')
genofile = open(config.get('config', 'genofile'), 'r')
metadic = {}
# parse genofile
@@ -27,9 +29,14 @@ def main(argv):
metadic[kv[0].strip()] = kv[1].strip()
continue
if line.lower().startswith("chr"):
- print "geno meta:"
+ #
+ print "geno file meta:"
for k, v in metadic.items():
print "\t%s: %s" % (k, v)
+ #
+ print "geno file head:\n\t%s" % line
+ strainnames = line.split()[4:]
+ strains = datastructure.get_strains_bynames(speciesid, strainnames)
continue
cells = line.split()
Chr = cells[0]