aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/rqtl2/install_genotypes.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/rqtl2/install_genotypes.py b/scripts/rqtl2/install_genotypes.py
index 7f3f65a..709fe0f 100644
--- a/scripts/rqtl2/install_genotypes.py
+++ b/scripts/rqtl2/install_genotypes.py
@@ -99,7 +99,7 @@ def insert_genotype_data(dbconn: mdb.Connection,
markerids = {row["Name"]: row["Id"] for row in cursor.fetchall()}
cursor.execute("SELECT MAX(Id) AS lastid FROM GenoData")
lastid = cursor.fetchone()["lastid"]
- data = tuple(
+ data = tuple(item for item in (
{**row, "gid": gid}
for gid, row in enumerate(
({
@@ -109,6 +109,7 @@ def insert_genotype_data(dbconn: mdb.Connection,
} for innerrow in genotypes for marker in
(key for key in innerrow.keys() if key != "id")),
start=lastid+1))
+ if item["value"] is not None)
cursor.executemany(
"INSERT INTO GenoData(Id, StrainId, value) "
"VALUES(%(gid)s, %(indid)s, %(value)s)",