BioFSharp
BioFSharp copied to clipboard
[BUG] Obo.parseOboTerms too strict about parsing whitespace
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:
- 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: “”
"""
- 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().