library(seqinr) library(ape) ali.prot<-read.alignment("7.animals.aln",format="clustal") ali.rna<-read.alignment("7.mRNA.animals.aln",format="clustal") ali.rna.b<-as.DNAbin(ali.rna) d.prot<-dist.alignment(ali.prot,matrix="similarity") d.rna.F84<-dist.dna(ali.rna.b,model="F84") # I have no reason to choose this, except that it was amongst the better distance calculators t.prot<-nj(d.prot) t.prot<-root(t.prot,outgroup=7,resolve.root=T) # The 7th sequence is the Chicken sequence, it is the furthest from the others, so I choose this for root t.rna<-nj(d.rna.F84) t.rna<-root(t.rna,outgroup=7,resolve.root=T) # The 7th sequence is the Chicken sequence, it is the furthest from the others, so I choose this for root png('7.protein_phylogeneticTree.png') plot(t.prot) add.scale.bar(length=0.05)> add.scale.bar(length=0.05) dev.off() png('7.mRNA_phylogeneticTree.png') t.rna$tip.label<-t.prot$tip.label # protein fasta have much nicer labels plot(t.rna) add.scale.bar(length=0.05)> add.scale.bar(length=0.05) dev.off()