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

[BUG] Synonyms not correctly written to lines #27

Closed
Freymaurer opened this issue Oct 26, 2023 · 0 comments · Fixed by #28
Closed

[BUG] Synonyms not correctly written to lines #27

Freymaurer opened this issue Oct 26, 2023 · 0 comments · Fixed by #28
Assignees

Comments

@Freymaurer
Copy link
Member

I read the ncbitaxon ontology, filter out terms and write it again.

The source looks like this:

[Term]
id: NCBITaxon:562
name: Escherichia coli
namespace: ncbi_taxonomy
alt_id: NCBITaxon:1637691
alt_id: NCBITaxon:1806490
alt_id: NCBITaxon:469598
alt_id: NCBITaxon:662101
alt_id: NCBITaxon:662104
synonym: "Bacillus coli" RELATED synonym []
synonym: "Bacterium coli" RELATED synonym []
synonym: "Bacterium coli commune" RELATED synonym []
synonym: "E. coli" EXACT common_name []
synonym: "Enterococcus coli" RELATED synonym []
synonym: "Escherichia/Shigella coli" EXACT equivalent_name []
xref: GC_ID:11
xref: PMID:10319482
is_a: NCBITaxon:561 ! Escherichia
property_value: has_rank NCBITaxon:species

This is the output:

[Term]
id: NCBITaxon:562
name: Escherichia coli
alt_id: NCBITaxon:1637691
alt_id: NCBITaxon:1806490
alt_id: NCBITaxon:469598
alt_id: NCBITaxon:662101
alt_id: NCBITaxon:662104
synonym: { Text = ""Bacillus coli""
  Scope = Related
  TypeName = "synonym"
  DBXrefs = [] }
synonym: { Text = ""Bacterium coli""
  Scope = Related
  TypeName = "synonym"
  DBXrefs = [] }
synonym: { Text = ""Bacterium coli commune""
  Scope = Related
  TypeName = "synonym"
  DBXrefs = [] }
synonym: { Text = ""E. coli""
  Scope = Exact
  TypeName = "common_name"
  DBXrefs = [] }
synonym: { Text = ""Enterococcus coli""
  Scope = Related
  TypeName = "synonym"
  DBXrefs = [] }
synonym: { Text = ""Escherichia/Shigella coli""
  Scope = Exact
  TypeName = "equivalent_name"
  DBXrefs = [] }
xref: GC_ID:11
xref: PMID:10319482
property_value: has_rank NCBITaxon:species
is_a: OBI:0100026 ! organism

Obviously the ToString method is not for TermSynonym is not overwritten which produces this error, here:

for synonym in term.Synonyms do yield $"synonym: {synonym}"

I will try to do a PR tomorrow, is it possible to release this asap after review?

@omaus @kMutagene

@omaus omaus self-assigned this Oct 26, 2023
Freymaurer added a commit to Freymaurer/OBO.NET that referenced this issue Oct 26, 2023
@omaus omaus closed this as completed in #28 Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants