Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

One true #235

Merged
merged 2 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading