Closed AlexanderPico closed 2 years ago
I think this should be doable with the csv lib.
I found the offending line in the csv:
obo/PW_0002153,,,,VPetri,2015-11-02T15:22:40Z,,,PW:0002154,,,bumetanide pharmacokinetics pathway,,PW:0002154,
http://purl.obolibrary.org/obo/PW_0000028
,"alanine, aspartate and glutamate metabolic pathway",KEGG:00250,"Those metabolic reactions involved in the synthesis, utilization and/or degradation of alanine, aspartate and glutamate.|The definition was compiled based on the information on alanine and aspartate available at OneLook.",false,,,http://purl.obolibrary.org
It looks like it's not a stray quote after all. It's indicating that the term name is not "alanine", but rather, "alanine, aspartate and glutamate metabolic pathway".
So, yup, that's a csv lib parsing issue.
We would want this line parsed into:
annotations:
- type: Pathway Ontology
value: amino acid metabolic pathway
- type: Pathway Ontology
value: alanine, aspartate and glutamate metabolic pathway
I confirmed that this value (with a comma and no quotes) works well with the Jekyll code and resolves the table rendering bug.
I think this is addressed now in this commit: https://github.com/wikipathways/wikipathways-database/commit/288ce733e1607777c6ede0b290c4639382da3e29#diff-f3a0c6cf05b703b1241cd9c83a3c9efad10e6e84ce8f1246f0ffd25e1f2b8fcbL54
This example is from WP106.md. It looks like a stray double quote got in there and so your script put single quote around it. These are messing with the table parsing, however. See https://new.wikipathways.org/browse/table.html.
AFAIK, there should never be single or double quotes in Pathway Ontology terms (or other ontology terms). So, instead, could your script simply strip them out?