aboutsummaryrefslogtreecommitdiff
path: root/wqflask/maintenance
diff options
context:
space:
mode:
authorroot2014-02-20 15:57:15 -0600
committerroot2014-02-20 15:57:15 -0600
commit16afdd0bb4be4733a98db4ee656125ccd7a14293 (patch)
tree422fe311b8a9efb6aa4b59d6096831b8855ef4a1 /wqflask/maintenance
parent7022613e93a00a111b8548e41922c12315944f8e (diff)
downloadgenenetwork2-16afdd0bb4be4733a98db4ee656125ccd7a14293.tar.gz
Committer: root <root@alexandria.uthsc.edu>
On branch master
Diffstat (limited to 'wqflask/maintenance')
-rw-r--r--wqflask/maintenance/dataset/load_phenotypes.py40
1 files changed, 20 insertions, 20 deletions
diff --git a/wqflask/maintenance/dataset/load_phenotypes.py b/wqflask/maintenance/dataset/load_phenotypes.py
index 36c14990..5847da4b 100644
--- a/wqflask/maintenance/dataset/load_phenotypes.py
+++ b/wqflask/maintenance/dataset/load_phenotypes.py
@@ -53,23 +53,23 @@ def main(argv):
Phenotype.`Units`=%s
"""
cursor.execute(sql, (
- utilities.to_db_string_null(metarow[1]),
- utilities.to_db_string_null(metarow[2]),
- utilities.to_db_string_null(metarow[3]),
- utilities.to_db_string_null(metarow[4]),
- utilities.to_db_string_null(metarow[5]),
- utilities.to_db_string_null(metarow[6]),
- utilities.to_db_string_null(metarow[7]),
- utilities.to_db_string_null(metarow[8]),
- utilities.to_db_string_null(metarow[9]),
- utilities.to_db_string_null(metarow[18])
+ utilities.to_db_string(metarow[1], None),
+ utilities.to_db_string(metarow[2], None),
+ utilities.to_db_string(metarow[3], None),
+ utilities.to_db_string(metarow[4], None),
+ utilities.to_db_string(metarow[5], None),
+ utilities.to_db_string(metarow[6], None),
+ utilities.to_db_string(metarow[7], None),
+ utilities.to_db_string(metarow[8], None),
+ utilities.to_db_string(metarow[9], None),
+ utilities.to_db_string(metarow[18], None),
))
rowcount = cursor.rowcount
phenotypeid = con.insert_id()
print "INSERT INTO Phenotype: %d record: %d" % (rowcount, phenotypeid)
# Publication
publicationid = None # reset
- pubmed_id = utilities.to_db_string_null(metarow[0])
+ pubmed_id = utilities.to_db_string(metarow[0], None)
if pubmed_id:
sql = """
SELECT Publication.`Id`
@@ -96,15 +96,15 @@ def main(argv):
Publication.`Year`=%s
"""
cursor.execute(sql, (
- utilities.to_db_string_null(metarow[0]),
- utilities.to_db_string_null(metarow[12]),
- utilities.to_db_string_null(metarow[10]),
- utilities.to_db_string_null(metarow[11]),
- utilities.to_db_string_null(metarow[13]),
- utilities.to_db_string_null(metarow[14]),
- utilities.to_db_string_null(metarow[15]),
- utilities.to_db_string_null(metarow[16]),
- utilities.to_db_string_null(metarow[17]),
+ utilities.to_db_string(metarow[0], None),
+ utilities.to_db_string(metarow[12], None),
+ utilities.to_db_string(metarow[10], None),
+ utilities.to_db_string(metarow[11], None),
+ utilities.to_db_string(metarow[13], None),
+ utilities.to_db_string(metarow[14], None),
+ utilities.to_db_string(metarow[15], None),
+ utilities.to_db_string(metarow[16], None),
+ utilities.to_db_string(metarow[17], None),
))
rowcount = cursor.rowcount
publicationid = con.insert_id()