aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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]