From 7022613e93a00a111b8548e41922c12315944f8e Mon Sep 17 00:00:00 2001 From: root Date: Thu, 20 Feb 2014 15:33:07 -0600 Subject: Committer: root On branch master --- wqflask/maintenance/dataset/load_phenotypes.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'wqflask/maintenance/dataset') diff --git a/wqflask/maintenance/dataset/load_phenotypes.py b/wqflask/maintenance/dataset/load_phenotypes.py index 44876d53..36c14990 100644 --- a/wqflask/maintenance/dataset/load_phenotypes.py +++ b/wqflask/maintenance/dataset/load_phenotypes.py @@ -144,6 +144,23 @@ def main(argv): NStrain.`count`=%s """ cursor.execute(sql, (dataid, strainid, n)) + # PublishXRef + sql = """ + INSERT INTO PublishXRef + SET + PublishXRef.`InbredSetId`=%s, + PublishXRef.`PhenotypeId`=%s, + PublishXRef.`PublicationId`=%s, + PublishXRef.`DataId`=%s + """ + cursor.execute(sql, (inbredsetid, phenotypeid, publicationid, dataid)) + rowcount = cursor.rowcount + publishxrefid = con.insert_id() + print "INSERT INTO PublishXRef: %d record: %d" % (rowcount, publishxrefid) + # for loop next + dataid += 1 + # release + con.close() if __name__ == "__main__": print "command line arguments:\n\t%s" % sys.argv -- cgit v1.2.3