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

Issue with loading MCC tree from BEAST v 1.10.4 #71

Open
taylorpaisie opened this issue Nov 22, 2021 · 4 comments
Open

Issue with loading MCC tree from BEAST v 1.10.4 #71

taylorpaisie opened this issue Nov 22, 2021 · 4 comments

Comments

@taylorpaisie
Copy link

taylorpaisie commented Nov 22, 2021

I am having an issue when loading and trying to plot one of my MCC trees from a BEASTv1.10.4 run. Here is the link to my R code: https://gist.github.com/taylorpaisie/0c8b07d81003419d94426bfe814ea4ff

Here is the link to the tree I am trying to load and plot: https://gist.github.com/taylorpaisie/bc8b55df56a1730abeda49eb82d6bf1e

The warning message I receive when reading the BEAST tree with 'read.beast()' is:

Warning message:
In matrix(x, ncol = 2, byrow = TRUE) : data length [163] is not a sub-multiple or multiple of the number of rows [82]

Then when I use the 'ggtree' command in my script, my R session aborts completely. Any idea what could be causing this error?

@GuangchuangYu
Copy link
Member

image

There should be something wrong with your file.

ape::read.nexus() will parse the file with only tree structure by ignoring annotation.

It throws the same issue and can't draw the tree.

@brj1
Copy link
Contributor

brj1 commented Nov 24, 2021

There is a space in one of the taxon labels of the nexus file, which is causing read.nexus to not read the labels correctly.
Changing line 51 of your nexus from
'MF574563.1 _COL_2015'
to
'MF574563.1_COL_2015'
and line 137 from
46 'MF574563.1 _COL_2015',
to
46 'MF574563.1_COL_2015',
should make the file readable.

I'm not sure if spaces in labels is allowed by the nexus format. If so, this is a bug in ape::read.nexus.

@GuangchuangYu
Copy link
Member

As the labels are single-quoted, they should be supported IMO. Maybe we should include @emmanuelparadis to the discussion of this issue.

@xiangpin
Copy link
Member

I think this issue should be fixed by this request, the problem is like @brj1 said, I had submitted the request to solve the problem, so the development version of ape should work.

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

No branches or pull requests

4 participants