Skip to content

Commit

Permalink
For #2246
Browse files Browse the repository at this point in the history
  • Loading branch information
mugitty committed Jun 11, 2024
1 parent 1bb6f9c commit fe46253
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 15 deletions.
44 changes: 31 additions & 13 deletions ontobio/model/association.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,45 +209,63 @@ def fullname_field(self, max=None) -> str:

# ===============================================================================
__default_entity_type_to_curie_mapping = bidict.bidict({
"autocatalytically_spliced_intron": Curie.from_str("SO:0000588"),
"protein_coding_gene": Curie.from_str("SO:0001217"),
"protein": Curie.from_str("PR:000000001"),
"gene_product": Curie.from_str("CHEBI:33695"),
"autocatalytically_spliced_intron": Curie.from_str("SO:0000588"),
"snRNA": Curie.from_str("SO:0000274"),
"ncRNA": Curie.from_str("SO:0000655"),
"rRNA": Curie.from_str("SO:0000252"),
"mRNA": Curie.from_str("SO:0000234"),
"pre_miRNA": Curie.from_str("SO:0001244"),
"lincRNA": Curie.from_str("SO:0001463"),
"lncRNA": Curie.from_str("SO:0001877"),
"lncRNA": Curie.from_str("SO:0001877"),
"tRNA": Curie.from_str("SO:0000253"),
"snoRNA": Curie.from_str("SO:0000275"),
"miRNA": Curie.from_str("SO:0000276"),
"RNA": Curie.from_str("SO:0000356"),
"scRNA": Curie.from_str("SO:0000013"),
"piRNA": Curie.from_str("SO:0001035"),
"pre_miRNA": Curie.from_str("SO:0001244"),
"tmRNA": Curie.from_str("SO:0000584"),
"scaRNA": Curie.from_str("SO:0002095"),
"siRNA": Curie.from_str("SO:0000646"),
"SRP_RNA": Curie.from_str("SO:0000590"),
"siRNA": Curie.from_str("SO:0000646"),
"SRP_RNA": Curie.from_str("SO:0000590"),
"primary_transcript": Curie.from_str("SO:0000185"),
"ribozyme": Curie.from_str("SO:0000374"),
"telomerase_RNA": Curie.from_str("SO:0000390"),
"RNase_P_RNA": Curie.from_str("SO:0000386"),
"antisense_RNA": Curie.from_str("SO:0000644"),
"RNase_MRP_RNA": Curie.from_str("SO:0000385"),
"guide_RNA": Curie.from_str("SO:0000602"),
"vault_RNA": Curie.from_str("SO:0000404"),
"Y_RNA": Curie.from_str("SO:0000405"),
"hammerhead_ribozyme": Curie.from_str("SO:0000380"),
"protein": Curie.from_str("PR:000000001"),
"pseudogene": Curie.from_str("SO:0000336"),
"pseudogenic_transcript": Curie.from_str("SO:0000516"),
"protein_complex": Curie.from_str("GO:0032991"),
"gene": Curie.from_str("SO:0000704"),
"biological region": Curie.from_str("SO:0001411"),
"protein_complex": Curie.from_str("GO:0032991"),
"transcript": Curie.from_str("SO:0000673"),
"gene_product": Curie.from_str("CHEBI:33695"),
"antisense_lncRNA": Curie.from_str("SO:0001904"),
"antisense_lncRNA_gene": Curie.from_str("SO:0002182"),
"antisense_lncRNA_gene": Curie.from_str("SO:0002182"),
"transposable_element_gene": Curie.from_str("SO:0000111"),
"gene_segment": Curie.from_str("SO:3000000"),
"genetic_marker": Curie.from_str("SO:0001645"),
"biological region": Curie.from_str("SO:0001411"),
"transposable_element_gene": Curie.from_str("SO:0000111")
"lincRNA_gene": Curie.from_str("SO:0001641"),
"lncRNA_gene": Curie.from_str("SO:0002127"),
"miRNA_gene": Curie.from_str("SO:0001265"),
"ncRNA_gene": Curie.from_str("SO:0001263"),
"RNase_MRP_RNA_gene": Curie.from_str("SO:0001640"),
"RNase_P_RNA_gene": Curie.from_str("SO:0001639"),
"rRNA_gene": Curie.from_str("SO:0001637"),
"scRNA_gene": Curie.from_str("SO:0001266"),
"sense_intronic_ncRNA_gene": Curie.from_str("SO:0002184"),
"sense_overlap_ncRNA_gene": Curie.from_str("SO:0002183"),
"snoRNA_gene": Curie.from_str("SO:0001267"),
"snRNA_gene": Curie.from_str("SO:0001268"),
"SRP_RNA_gene": Curie.from_str("SO:0001269"),
"telomerase_RNA_gene": Curie.from_str("SO:0001643"),
"tRNA_gene": Curie.from_str("SO:0001272"),
"vault_RNA": Curie.from_str("SO:0000404"),
"Y_RNA": Curie.from_str("SO:0000405")
})

# ===============================================================================
Expand Down
3 changes: 1 addition & 2 deletions tests/test_gafparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -611,8 +611,7 @@ def test_gaf_gpi_bridge():
association = gafparser.to_association(gaf, qualifier_parser=assocparser.Qualifier2_2()).associations[0]
bridge = gafgpibridge
entity = bridge.convert_association(association)
#gene gets updated to gene_product!!!!
assert entity.get("type") == ["gene_product"]
assert entity.get("type") == ["gene"]


if __name__ == "__main__":
Expand Down

0 comments on commit fe46253

Please sign in to comment.