Question: dist.dna, and phylogenetic tree
gravatar for l.roca
3.7 years ago by
l.roca10 wrote:


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 <-, model="JC69")

tree <- NJ(dm)




phylogenetic • 2.2k views
ADD COMMENTlink modified 3.7 years ago by Brice Sarver2.4k • written 3.7 years ago by l.roca10
gravatar for Brice Sarver
3.7 years ago by
Brice Sarver2.4k
United States
Brice Sarver2.4k wrote:

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. requires an object of class phyDat. The code should be:

dm <- read.phyDat("F:/AlignedSeqs.fasta", format="fasta", type="DNA")
ADD COMMENTlink written 3.7 years ago by Brice Sarver2.4k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1503 users visited in the last hour