Entering edit mode
Hello Im trying to import a ML tree from phangorn to ggtree trought treeio but when i try to do it with the function as.treedata i got the following errror about seq lenghts
alignment_XP_057292180 <- read.phyDat('~/Align/XP_057292180.fas', format = 'fasta', type = 'AA')
dist_XP_057292180 <- dist.ml(alignment_XP_057292180)
tree_XP_057292180 <- NJ(dist_XP_057292180)
fit_XP_057292180 <- pml(tree_XP_057292180, data = alignment_XP_057292180)
fit_XP_057292180_tree <- optim.pml(fit_XP_057292180, model = "WAG")
phylo_tree_XP_057292180 <- as.treedata(fit_XP_057292180_tree)
Error in getSubsLabel(seqs, label[pp[i]], label[i], translate, removeGap) :
seqA should have equal length to seqB
I previously align the sequences using MUSCLE algorith on MEGA and check all were the same leghnt. Someone knows hoe to fix it