Skip to content

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

Description

@gwct

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions