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

OBO SyntaxError on backslash in xref #236

Open
jggatter opened this issue Feb 19, 2025 · 1 comment
Open

OBO SyntaxError on backslash in xref #236

jggatter opened this issue Feb 19, 2025 · 1 comment

Comments

@jggatter
Copy link

jggatter commented Feb 19, 2025

Hi,

With the newest versions of pronto and fastobo, 2.6.0 and 0.13.0, we are now seeing an error when loading our uberon.obo file:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/ubuntu/Projects/TileDB/cyvocab/cyvocab/ontologies/_ontologies.py", line 58, in ontology
    ontology = pronto.ontology.Ontology(self.file_path)
  File "/home/ubuntu/venv/cynapse/lib/python3.9/site-packages/pronto/ontology.py", line 283, in __init__
    cls(self).parse_from(_handle)  # type: ignore
  File "/home/ubuntu/venv/cynapse/lib/python3.9/site-packages/pronto/parsers/obo.py", line 44, in parse_from
    raise SyntaxError(s.args[0], location) from None
  File "/tmp/cyvocab/uberon.obo", line 7095
    xref: http://neurolex.org/wiki/Category\:Embryonic_organism
                                           ^
SyntaxError: expected EOL, QuotedString, RFC3987_IriPctEncoded, or RFC3987_IriUCSChar

It appears based on this stack trace that the \ in the xref of this entry is the issue.

[Term]
id: UBERON:0000922
name: embryo
def: "Anatomical entity that comprises the organism in the early stages of growth and differentiation that are characterized by cleavage, the laying down of fundamental tissues, and the formation of primitive organs and organ systems. For example, for mammals, the process would begin with zygote formation and end with birth. For insects, the process would begin at zygote formation and end with larval hatching. For plant zygotic embryos, this would be from zygote formation to the end of seed dormancy. For plant vegetative embryos, this would be from the initial determination of the cell or group of cells to form an embryo until the point when the embryo becomes independent of the parent plant." [BTO:0000379, FB:FBrf0039741, FB:FBrf0041814, GO:0009790, Wikipedia:Embryo]
subset: efo_slim
subset: pheno_slim
subset: uberon_slim
subset: vertebrate_core
synonym: "developing organism" RELATED [BILA:0000056]
synonym: "developmental tissue" RELATED []
synonym: "embryonic organism" EXACT [BILA:0000056]
xref: AAO:0011035
xref: AEO:0000169
xref: BILA:0000056
xref: BSA:0000039
xref: BTO:0000379
xref: CALOHA:TS-0229
xref: EFO:0001367
xref: EHDAA2:0000002
xref: EHDAA2_RETIRED:0003236
xref: EHDAA:38
xref: EMAPA:16039
xref: FBbt:00000052
xref: FMA:69068
xref: GAID:963
xref: http://neurolex.org/wiki/Category\:Embryonic_organism
xref: MAT:0000226
xref: MESH:D004622
xref: MIAA:0000019
xref: NCIT:C28147
xref: OGEM:000001
xref: OpenCyc:Mx4rwP1ceZwpEbGdrcN5Y29ycA
xref: SCTID:57991002
xref: UMLS:C0013935 {source="ncithesaurus:Embryo"}
xref: VHOG:0001766
xref: Wikipedia:Embryo
xref: XAO:0000113
xref: ZFA:0000103
is_a: UBERON:0000468 ! multicellular organism

Reverting via pip install 'fastobo<0.13.0' 'pronto<2.6.0' resolves the issue.

We are using an old version of UBERON, so it seems like this link is no longer correct (the page has been moved to another website). Still I figure it's worth bringing to attention!

Thanks again for pronto and fastobo! Really amazing packages!

Best,
James

@isaacoderberg
Copy link

Reverting via pip install 'fastobo<0.13.0' 'pronto<2.6.0' likewise resolved the issue for me. The Treatment ontology was no longer accepting "liver" as a valid tissue.

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

No branches or pull requests

2 participants