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

Make sure that species names match tree tip labels #87

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

clementviolet
Copy link

Hi!

I recently ran into a problem. In a dataset some species have a subgenus between parenthesis. I wasn't able to create a heatmap of the parameter estimates of species' environmental responses including a phylogeny tree.

I digged into the code and found that the issue is due to ape::write.tree.

tree <- ape::read.tree(text=ape::write.tree(tree))

The ape::write.tree() doc specify that:

The tip labels (and the node labels if present) are checked before being printed: the leading and trailing spaces, and the leading left and trailing right parentheses are deleted; the other spaces are replaced by underscores; the commas, colons, semicolons, and the other parentheses are replaced with dashes.

Now, when commas, colons, semicolons or parentheses are present in the species name they are temporarily replaced by - to match the name of the tree tips.

@jarioksa
Copy link
Collaborator

jarioksa commented Jan 9, 2022

It seems that HMSC also means "Honda Malaysia Suppliers Club".

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