aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorLei Yan2014-02-21 17:04:51 -0600
committerLei Yan2014-02-21 17:04:51 -0600
commit1014d09efced9c36274aec0d2486469648569721 (patch)
tree152d489c8b56349c6f3680ee7cf5554c95df90c0 /wqflask
parentff6224c23ff0894012297dc569de0bfdbb0da1c3 (diff)
downloadgenenetwork2-1014d09efced9c36274aec0d2486469648569721.tar.gz
On branch master
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/maintenance/dataset/datasampledir/load_genotypes/config.ini8
-rw-r--r--wqflask/maintenance/dataset/load_genotypes.py17
2 files changed, 15 insertions, 10 deletions
diff --git a/wqflask/maintenance/dataset/datasampledir/load_genotypes/config.ini b/wqflask/maintenance/dataset/datasampledir/load_genotypes/config.ini
index 638c3bd8..1f977cf8 100644
--- a/wqflask/maintenance/dataset/datasampledir/load_genotypes/config.ini
+++ b/wqflask/maintenance/dataset/datasampledir/load_genotypes/config.ini
@@ -1,4 +1,6 @@
[config]
-inbredsetid = 1
-datafile = datasampledir/load_phenotypes/sample_data.txt
-metafile = datasampledir/load_phenotypes/sample_meta.txt
+genofile = datasampledir/load_genotypes/sample.geno
+U = x
+H = 0
+B = -1
+D = 1
diff --git a/wqflask/maintenance/dataset/load_genotypes.py b/wqflask/maintenance/dataset/load_genotypes.py
index d309a903..204fb926 100644
--- a/wqflask/maintenance/dataset/load_genotypes.py
+++ b/wqflask/maintenance/dataset/load_genotypes.py
@@ -1,3 +1,8 @@
+import sys
+import re
+
+import utilities
+
def main(argv):
# config
config = utilities.get_config(argv[1])
@@ -21,11 +26,10 @@ def main(argv):
kv = re.split(':|=', item)
metadic[kv[0].strip()] = kv[1].strip()
continue
- if line.startswith("Chr"):
- print "[meta dictionary]"
- for k,v in metadic.items():
- print "%s: %s" % (k, v)
- print
+ if line.lower().startswith("chr"):
+ print "geno meta:"
+ for k, v in metadic.items():
+ print "\t%s: %s" % (k, v)
continue
cells = line.split()
Chr = cells[0]
@@ -33,7 +37,6 @@ def main(argv):
cM = cells[2]
Mb = cells[3]
print len(cells)
- ?
return
# open db
@@ -183,7 +186,7 @@ def main(argv):
file_geno.close()
con.close()
-# main
if __name__ == "__main__":
+ print "command line arguments:\n\t%s" % sys.argv
main(sys.argv)
print "exit successfully"