R
library("seqinr")
library("phangorn")
mySeqaln <- read.alignment(file ="plnR.phy", format= "phylip“)
mydist <- dist.alignment(mySeqaln)
tree.nj <- nj(mydist)
source("unrootedNJtree.r")
source("cleanAlignment.r")
cleanedrsmaln <- cleanAlignment(mySeqaln , 65, 5)
source("rootedNJtree.r")
opar <- par(mfrow = c(2, 2))
plot(tree.nj, cex.main=0.8, main = "Neighbor-Joining")
rsmtree <-unrootedNJtree(mySeqaln , type="DNA")
title("The unrooted phylogenetic tree constructed by Neighbor-Joining
method ", cex.main=0.8)
cleanedrsmtree <-unrootedNJtree(cleanedrsmaln, type="DNA")
title("The phylogenetic tree constructed by Neighbor-Joining method
after the verifying alignment", cex.main=0.8)
cleanedrsmtree <- rootedNJtree(cleanedrsmaln, "CP002222.1", type="DNA")
title("The rooted tree phylogenetic tree constructed by Neighbor-Joining
method after the verifying alignment", cex.main=0.8)
matlab