dist.dna, dist.ml and phylogenetic tree
1
0
Entering edit mode
9.4 years ago
l.roca ▴ 10

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

phylogenetic • 5.0k views
ADD COMMENT
2
Entering edit mode
9.4 years ago
Brice Sarver ★ 3.8k

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")
ADD COMMENT

Login before adding your answer.

Traffic: 2015 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6