YuLab-SMU/tidytree

error in getSubsLabel

Closed this issue · 1 comments

I have a bizarre issue. I tried the following:

library(treeio)
library(ggtree)
library(phangorn)
tre <- read.tree("NA.nwk")
tipseq <- read.phyDat("NA.fas",type="AA",format="fasta")
fit <- pml(tre, tipseq, k=4)
fit <- optim.pml(fit, optNni=FALSE, optBf=T, optQ=T,
optInv=T, optGamma=T, optEdge=TRUE,
optRooted=FALSE, model = "WAG",
control = pml.control(trace =0))
pmltree <- as.treedata(fit)

and I get the error 👍

error in getSubsLabel(seqs, label[pp[i]], label[i], translate, removeGap) :
seqA should have equal length to seqB

I use R 4.0.3. Using instead a file with only one character labels does not help. Is it that amino acid sequences are not supported ?

NA_nwk.txt
NA_withnodelabels_nwk.txt
NA_fas.txt