aboutsummaryrefslogtreecommitdiff
path: root/wqflask/maintenance
diff options
context:
space:
mode:
authorLei Yan2014-02-22 21:57:13 -0600
committerLei Yan2014-02-22 21:57:13 -0600
commit866305ffa728cb6e90f16015b0b881ba6cb0362e (patch)
treeeebaee9ec56b70bca7d089cccc42cf35fb8e59b8 /wqflask/maintenance
parent30889320c00673660d194fc03b912d1832e5a6ed (diff)
downloadgenenetwork2-866305ffa728cb6e90f16015b0b881ba6cb0362e.tar.gz
On branch master
Diffstat (limited to 'wqflask/maintenance')
-rw-r--r--wqflask/maintenance/dataset/datasampledir/load_genotypes/sample.geno26
-rw-r--r--wqflask/maintenance/dataset/datastructure.py10
-rw-r--r--wqflask/maintenance/dataset/load_genotypes.py12
3 files changed, 29 insertions, 19 deletions
diff --git a/wqflask/maintenance/dataset/datasampledir/load_genotypes/sample.geno b/wqflask/maintenance/dataset/datasampledir/load_genotypes/sample.geno
index 6dad9ace..618e4833 100644
--- a/wqflask/maintenance/dataset/datasampledir/load_genotypes/sample.geno
+++ b/wqflask/maintenance/dataset/datasampledir/load_genotypes/sample.geno
@@ -1,14 +1,12 @@
-@name:BXD
-@type:riset
-@mat:B
-@pat:D
-@het:H
-@unk:U
-Chr Locus cM Mb BXD1 BXD2 BXD5 BXD6 BXD8
-1 rs6269442 0 3.482275 B B D D D
-1 rs6365999 0 4.811062 B B D D D
-1 rs6376963 0.895 5.008089 B B D D D
-1 rs3677817 1.185 5.176058 B B D D D
-1 rs8236463 2.081 5.579193 B B D D D
-1 rs6333200 2.081 6.217921 B B D D D
-1 rs6298633 2.367 6.820241 B B D D D
+@name:BXD
+@type:riset
+@mat:B
+@pat:D
+@het:H
+@unk:U
+Chr Locus cM Mb BXD1 BXD2 BXD5 BXD6 BXD8
+1 rs6269442 0 3.482275 B B D D D
+2 rs6365999 0.3 4.811062 B B D D D
+3 rs6376963 0.895 5.008089 B B D D D
+4 rs3677817 1.185 5.176058 B B D D D
+5 rs8236463 2.081 5.579193 B B D D D
diff --git a/wqflask/maintenance/dataset/datastructure.py b/wqflask/maintenance/dataset/datastructure.py
index fd9386b3..0ee4b4ab 100644
--- a/wqflask/maintenance/dataset/datastructure.py
+++ b/wqflask/maintenance/dataset/datastructure.py
@@ -55,6 +55,16 @@ def get_species(inbredsetid):
"""
cursor.execute(sql, (inbredsetid))
return cursor.fetchone()
+
+def get_genofreeze_byinbredsetid(inbredsetid):
+ cursor, con = utilities.get_cursor()
+ sql = """
+ SELECT GenoFreeze.`Id`, GenoFreeze.`Name`, GenoFreeze.`FullName`, GenoFreeze.`InbredSetId`
+ FROM GenoFreeze
+ WHERE GenoFreeze.`InbredSetId`=%s
+ """
+ cursor.execute(sql, (inbredsetid))
+ return cursor.fetchone()
def get_nextdataid_phenotype():
cursor, con = utilities.get_cursor()
diff --git a/wqflask/maintenance/dataset/load_genotypes.py b/wqflask/maintenance/dataset/load_genotypes.py
index 0ae2c5cd..bca99b95 100644
--- a/wqflask/maintenance/dataset/load_genotypes.py
+++ b/wqflask/maintenance/dataset/load_genotypes.py
@@ -38,12 +38,14 @@ def main(argv):
strainnames = line.split()[4:]
strains = datastructure.get_strains_bynames(speciesid, strainnames)
continue
+ # geno line
cells = line.split()
- Chr = cells[0]
- Locus = cells[1]
- cM = cells[2]
- Mb = cells[3]
- print len(cells)
+ chr = cells[0]
+ locus = cells[1]
+ cm = cells[2]
+ mb = cells[3]
+ values = cells[4:]
+ print values
return
# open db