althonos / althonos/pronto

OBO SyntaxError on backslash in xref

Ouverte
#236 2 commentaires 2 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Python
Étoiles
267
Forks
48
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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 "", line 1, in
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

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.