From 066eb7ff10b0dd1c3727ec7c63d013941e52ca3a Mon Sep 17 00:00:00 2001 From: ianlongden Date: Thu, 18 Apr 2024 13:50:21 -0400 Subject: [PATCH 1/2] one true value in synonyms --- Load/gene_alleles.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Load/gene_alleles.py b/Load/gene_alleles.py index 5f33785..5f83e0d 100644 --- a/Load/gene_alleles.py +++ b/Load/gene_alleles.py @@ -152,7 +152,7 @@ def create_gene(cursor, count, gene_prefix, cvterm_id, org_id, db_id, pub_id, fe # add feature_synonym for gene if pub_id != feature_id['unattributed']: - cursor.execute(fs_sql, (symbol_id, gene_id, pub_id, True)) + cursor.execute(fs_sql, (symbol_id, gene_id, pub_id, False)) cursor.execute(fs_sql, (symbol_id, gene_id, feature_id['unattributed'], True)) # add feature pub for gene @@ -263,7 +263,7 @@ def _create_allele(cursor, allele_name, sgml_name, allele_unique_name, cvterm_id # add feature_synonym for allele if pub_id != feature_id['unattributed']: - cursor.execute(fs_sql, (symbol_id, allele_id, pub_id, True)) + cursor.execute(fs_sql, (symbol_id, allele_id, pub_id, False)) cursor.execute(fs_sql, (symbol_id, allele_id, feature_id['unattributed'], True)) # add fullname synonym for allele @@ -271,11 +271,6 @@ def _create_allele(cursor, allele_name, sgml_name, allele_unique_name, cvterm_id cvterm_id['fullname'], "{}-fullname".format(sgml_name))) symbol_id = cursor.fetchone()[0] - # add feature_synonym for allele - if pub_id != feature_id['unattributed']: - cursor.execute(fs_sql, (symbol_id, allele_id, pub_id, True)) - cursor.execute(fs_sql, (symbol_id, allele_id, feature_id['unattributed'], True)) - # add alternative not current feature_synonym for allele cursor.execute(syn_sql, ("alt-{}".format(allele_name), cvterm_id['symbol'], "alt-{}".format(sgml_name))) From b32eb1c284b5c3bfcfd32df01d26822e1118f132 Mon Sep 17 00:00:00 2001 From: ianlongden Date: Thu, 18 Apr 2024 13:50:38 -0400 Subject: [PATCH 2/2] one true value in synonyms --- add-test_data.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/add-test_data.py b/add-test_data.py index c4004bc..dcd0d73 100755 --- a/add-test_data.py +++ b/add-test_data.py @@ -363,9 +363,9 @@ def load_pub_author_pubprop(parsed_yaml): mrna_id = cursor.fetchone()[0] # add synonyms - cursor.execute(syn_sql, ("fullname-{}".format(i+1), cvterm_id['fullname'], "fullname-{}RA".format(i+1))) + cursor.execute(syn_sql, ("fullname-{}RA".format(i+1), cvterm_id['fullname'], "fullname-{}RA".format(i+1))) name_id = cursor.fetchone()[0] - cursor.execute(syn_sql, ("symbol-{}".format(i+1), cvterm_id['symbol'], "symbol-{}RA".format(i+1))) + cursor.execute(syn_sql, ("symbol-{}RA".format(i+1), cvterm_id['symbol'], "symbol-{}RA".format(i+1))) symbol_id = cursor.fetchone()[0] # add feature_synonym