From 30889320c00673660d194fc03b912d1832e5a6ed Mon Sep 17 00:00:00 2001 From: Lei Yan Date: Sat, 22 Feb 2014 21:41:31 -0600 Subject: On branch master --- .../maintenance/dataset/datasampledir/load_genotypes/config.ini | 1 + wqflask/maintenance/dataset/load_genotypes.py | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'wqflask/maintenance') 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] -- cgit v1.2.3