harmsm / phylo_tools

python tools for phylogenetic inference
The Unlicense
0 stars 2 forks source link

regular expression problems in editNames.py #1

Open Zsailer opened 9 years ago

Zsailer commented 9 years ago

Regular expression problem! Always super fun to deal with!

The pretty_name generated by createNames.py keeps the organism name in brackets, which the regular expression parser in editNames.py recognizes as a bad character and breaks. I'm posting here to remind myself to fix this when I get a chance.

Zsailer commented 9 years ago

Turns out the brackets aren't the core problem.

For expressions with brackets and a hyphen, regex was trying to interpret this as a range. Example: That causes problems when the name has something like [organism A F-508]. Regex can't take F-5 because it thinks it's a range between a character and a number.

Will submit a fix soon.