Skip to content

Commit

Permalink
Merge pull request #235 from FlyBase/one_true
Browse files Browse the repository at this point in the history
One true
  • Loading branch information
ianlongden authored Apr 18, 2024
2 parents 6a3ca5f + b32eb1c commit 9e12ead
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
9 changes: 2 additions & 7 deletions Load/gene_alleles.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -263,19 +263,14 @@ 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
cursor.execute(syn_sql, ("{}-fullname".format(allele_name),
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)))
Expand Down
4 changes: 2 additions & 2 deletions add-test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9e12ead

Please sign in to comment.