diff options
author | root | 2014-02-19 16:42:28 -0600 |
---|---|---|
committer | root | 2014-02-19 16:42:28 -0600 |
commit | 13b090fc47504c2ddf73f38cd16aa67f0f41d4ba (patch) | |
tree | 0a47e633af58835bb458824f0c4298163b1eb7e6 /wqflask/maintenance/dataset | |
parent | 685cb9e8ffd23ec9c0943299fa9a2caa98a3852e (diff) | |
download | genenetwork2-13b090fc47504c2ddf73f38cd16aa67f0f41d4ba.tar.gz |
Committer: root <root@alexandria.uthsc.edu>
On branch master
Diffstat (limited to 'wqflask/maintenance/dataset')
-rw-r--r-- | wqflask/maintenance/dataset/datastructure.py | 14 | ||||
-rw-r--r-- | wqflask/maintenance/dataset/load_phenotypes.py | 1 |
2 files changed, 15 insertions, 0 deletions
diff --git a/wqflask/maintenance/dataset/datastructure.py b/wqflask/maintenance/dataset/datastructure.py index 400c7fda..9f1433e2 100644 --- a/wqflask/maintenance/dataset/datastructure.py +++ b/wqflask/maintenance/dataset/datastructure.py @@ -44,3 +44,17 @@ def get_inbredset(probesetfreezeid): """ cursor.execute(sql, (probesetfreezeid)) return cursor.fetchone() + +def get_nextdataid_phenotype(): + cursor = utilities.get_cursor() + sql = """ + SELECT PublishData.`Id` + FROM PublishData + ORDER BY PublishData.`Id` DESC + LIMIT 1 + """ + cursor.execute(sql) + re = cursor.fetchone() + dataid = re[0] + dataid += 1 + return dataid diff --git a/wqflask/maintenance/dataset/load_phenotypes.py b/wqflask/maintenance/dataset/load_phenotypes.py index 98c22229..77133d0c 100644 --- a/wqflask/maintenance/dataset/load_phenotypes.py +++ b/wqflask/maintenance/dataset/load_phenotypes.py @@ -11,6 +11,7 @@ def main(argv): print "\t%s" % (str(item)) # var inbredsetid = config.get('config', 'inbredsetid') + dataid = utilities.get_nextdataid_phenotype() cursor, con = utilities.get_cursor() print "inbredsetid: %s" % inbredsetid # datafile |