Skip to content

Regex fixes for compound name parsing#13

Open
lasagen wants to merge 6 commits intoRobaina:masterfrom
lasagen:master
Open

Regex fixes for compound name parsing#13
lasagen wants to merge 6 commits intoRobaina:masterfrom
lasagen:master

Conversation

@lasagen
Copy link
Copy Markdown

@lasagen lasagen commented Dec 17, 2025

Hello! Thank you so much for your work on BRENDApyrser. I was using it for a study and found a few issues.

  1. Splitting on the "+" character to parse out the reactions was also getting rid of +s indicating that a compound was a positive ion, e.g. H+. I changed substratesAndProducts to only split on "+" if there are spaces around it and leave +s in compound names.
  2. Comments inside pipe | characters were being left in the compound name instead of being added to the meta field. I added them to the meta field in __extractDataField and __extractReactionMechanismInfo.
  3. Issue Compound names wrongly parsed #12 mentions compound names being wrongly parsed when they contain parentheses. This is because the parser was extracting the first match of something in parentheses and putting that in the meta field. I changed extractDataLineInfo to only add something in parentheses to the meta field if it starts with whitespace.

These worked for me, but there are definitely better ways to do them, so feel free to suggest changes. Thanks again!

@lasagen
Copy link
Copy Markdown
Author

lasagen commented Dec 29, 2025

Hey, I saw that the macos-latest check was failing for this PR - looking at the details it seems to be failing in the middle of setting up the conda environment, before the build and test stages. Is this just a case where you have to update the action, or is there something I'm missing that I should change?

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

Successfully merging this pull request may close these issues.

1 participant