Open antoine4ucsd opened 1 year ago
hello thank you for your nice package I am trying to use it in order to plot my tree along with aminoacid sub (with ggtree). My input are a nt alignment of 130 sequences and its phylo. the alignement contains some gaps.
My code
sampletree=read.tree(mytree) tre=midpoint.root(sampletree) tipseq <- read.phyDat("myfasta.fasta",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 = "GTR") pmltree <- treeio::as.treedata(fit) ggtree(pmltree) + geom_text(aes(x=branch, label=AA_subs, vjust=-.5))
but I get this error with treeio::as.treedata(fit):
Error in getSubsLabel(seqs, label[pp[i]], label[i], translate, removeGap) : seqA should have equal length to seqB
any suggestions? thank you ++
you should provide example data to reproduce this issue.
hello thank you for your nice package I am trying to use it in order to plot my tree along with aminoacid sub (with ggtree). My input are a nt alignment of 130 sequences and its phylo. the alignement contains some gaps.
My code
but I get this error with treeio::as.treedata(fit):
any suggestions? thank you ++