BioFSharp icon indicating copy to clipboard operation
BioFSharp copied to clipboard

[BUG] Obo.parseOboTerms too strict about parsing whitespace

Open Freymaurer opened this issue 4 years ago • 0 comments

Describe the bug I tried to parse the nfdi4pso.obo file and got no oboterms. Found out, that whitespace after [Term] kill the parsing, so i added a Trim function. Maybe this could be added to the core function?

To Reproduce Steps to reproduce the behavior:

  1. Download .obo file from above or use the following:
"""
[Term] 
id: NFDI4PSO:0000005
name: Humidity Day
def: "This term defines the relative humidity of the air at daytime, it is a specialised concept of http://www.ontobee.org/ontology/PECO?iri=http://purl.obolibrary.org/obo/PECO_0007197”
comment: “”
"""
  1. Use code to parse:
termString
|> String.split('\n')
|> Seq.map (fun x -> x.Trim()) // Without this it will not work
|> Obo.parseOboTerms
|> Array.ofSeq

Additional context @kMutagene found that this could be added here via en.Current -> en.Current.Trim().

Freymaurer avatar May 12 '21 09:05 Freymaurer