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

If tip labels exist that are substrings of other tip labels the program will crash #7

Open
gwct opened this issue Aug 12, 2022 · 0 comments
Labels

Comments

@gwct
Copy link
Owner

gwct commented Aug 12, 2022

I recently discovered this bug in my tree parsing function. If one tip label's string is contained in another (e.g. "RS4" is contained within "RS42") it can't properly parse the tree. In the context of GRAMPA, this means that the program will crash on step 5 when trying to build MUL-trees. This would show up as an IndexError (see #6).

A quick solution would be to check tip labels after reading them to see if they are substrings of others and simply add a unique suffix string if they are. Eventually though, an overhaul of the tree parsing functions may be warranted.

For a quick fix on the user-side, if users encounter this error they can identify the tip labels that are substrings of others and manually add a unique suffix string with find/replace in a text editor or something like sed. For example, in #6 I replaced the tips labeled "RS4" with "RS4a" in both the species and the gene trees and GRAMPA ran successfully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant