Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix robust counting and regex for string comments #23

Merged
merged 4 commits into from
Mar 30, 2021

Conversation

gkarthik
Copy link
Contributor

Two changes,

  • Changed regex to allow parsing of robust counts when codon not present
  • Regex for parsing in strings seems to be doing something unexpected.

L1069 has the following regex: [,&][A-Za-z\_\.0-9]+=["|\']*[A-Za-z\_0-9\.\+ :\/\(\)\&\-]+[\"|\']*. It is unclear what the * is doing? Removing it seems to restore expected behavior.

@evogytis
Copy link
Owner

It looks like what we had earlier with * was quite permissive and parses some comments multiple times (the correct type and then as strings for the second time). Unfortunately this pull request breaks parsing of beast2 strings (see https://github.com/blab/mers-structure/blob/master/data/figure%201-source%20data%201.zip or https://raw.githubusercontent.com/nicfel/Reassortment-Tutorial/master/precooked_runs/H1N1pdm.mcc.network.trees) which are not enclosed with quotes. I think we should start collating various trees we encounter to include in unit tests for exactly these types of scenarios.

@evogytis evogytis merged commit fb61244 into evogytis:master Mar 30, 2021
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.

2 participants