dist.dna, dist.ml and phylogenetic tree
Hi,
I wish to prepare a a phylogenetic tree based on an aligned fasta file.
Is the script below correct?
data <- read.dna("F:/AlignedSeqs.fasta", format = "fasta")
datamat = dist.dna(data,model = "JC69")
treeUPGMA = upgma(dmmat)
And If I want to use the phangorn why this script does not work:
dm <- dist.ml(data, model="JC69")
tree <- NJ(dm)
plot(tree)
Thanks
• 5,615 views
•
link
1 answer
1. The above code will produce a specific kind of distance tree (using UPGMA). If this is what you want, with its caveats, then it is correct.
2. dist.ml() requires an object of class phyDat. The code should be:
dm <- read.phyDat("F:/AlignedSeqs.fasta", format="fasta", type="DNA")
• 0 views
•
link
Log in to answer this question.