1 of 20

2 of 20

3 of 20

4 of 20

5 of 20

6 of 20

7 of 20

8 of 20

9 of 20

10 of 20

11 of 20

R

12 of 20

13 of 20

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)

14 of 20

15 of 20

16 of 20

17 of 20

matlab

18 of 20

19 of 20

20 of 20