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

tree: Unable to use IQ-TREE -g option if strain name contains certain characters #875

Open
joverlee521 opened this issue Mar 24, 2022 · 1 comment
Assignees
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@joverlee521
Copy link
Contributor

Current Behavior

Within augur tree we replace certain characters in strain names with random strings before passing the renamed FASTA to IQ-TREE.

augur/augur/tree.py

Lines 214 to 219 in 945b49a

def random_string(n):
from string import ascii_uppercase as letters
return "".join([letters[i] for i in np.random.randint(len(letters), size=n)])
prefix = "DELIM"
escape_dict = {c:f'_{prefix}-{random_string(20)}_' for c in '/|()*'}
reverse_escape_dict = {v:k for k,v in escape_dict.items()}

This results in IQ-TREE being unable to match the original strain names provided in the constraint tree via the -g option.

Expected behavior

I'm not sure what should be the expected behavior here. Do we want to be able to support all IQ-TREE options via augur tree or do we make it clear that certain options may not work?

Additional context

First noticed this issue when exploring nextstrain/seasonal-flu#79 with @corneliusroemer

@joverlee521 joverlee521 added the bug Something isn't working label Mar 24, 2022
@victorlin
Copy link
Member

Do we want to be able to support all IQ-TREE options via augur tree or do we make it clear that certain options may not work?

No, we should update docs to make this clear.

@victorlin victorlin added the documentation Improvements or additions to documentation label Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
No open projects
Status: Prioritized
Development

No branches or pull requests

3 participants