Neighbor Joining method in Phylip

To carry out phylogenetic analysis it is important to begin with an alignment in which all gap-containing positions have been removed.

CLUSTAL 2.0.12 multiple sequence alignment


zf_12a1_a       VADLVFLVDGSWSVGRENFRFIRSFIGA--
zf_12a1_b       KADLVFLIDGSWSIGDDSFAKVRQFVFS--
hs_22a1         HYDLVFLLDTSSSVGKEDFEKVRQWVAN--
hs_a11          YMDIVIVLDGSNSIYP--WVEVQHFLINIL
zf_a11          YMDIVIVLDGSNSIYP--WNEVQDFLINIL
                  *:*:::* * *:    :  :: ::    
  • This can be accomplished using the gap strip tool.

  • There is a bug in the process but the gap-free alignment can be loaded into clustalX, the the save sequences as "Phylip" format function can be used.

        5  26
zf_12a1_a  VADLVFLVDGSWSVGRFRFIRSFIGA
zf_12a1_b  KADLVFLIDGSWSIGDFAKVRQFVFS
hs_22a1    HYDLVFLLDTSSSVGKFEKVRQWVAN
hs_a11     YMDIVIVLDGSNSIYPWVEVQHFLIN
zf_a11     YMDIVIVLDGSNSIYPWNEVQDFLIN
  • The correct alignment can be created with a text editor. Another version of it is in your clustal/phylip folder called tiny_nogap.phy

  • enter the phylip folder:

cd /home/USERNAME/clustal/phylip/
  • The first step to to create the bootstrap replicates. This is done with the phylip application seqboot.

seqboot
  • when prompted, provide the name "tiny_nogap.phy".

  • At the interactive menu:

    • change option r to 10 for 10 replicates. NOTE: normally the number used is 1000 for neighbor

    • press Y to accept changes

    • enter 111 as random number seed.

cat outfile
  • Move outfile to tiny_nogap.seqboot

mv outfile tiny_nogap.seqboot
  • The next step is to calculate the distances between the sequences in each replicate. This is done with protdist

protdist
  • when prompted, provide the name "tiny_nogap.seqboot".

  • At the interactive menu:

    • change option m to d for datasets and 10 for number of replicates.

    • press Y to accept changes

cat outfile
  • Rename the outfile

mv outfile tiny_nogap.protdist
  • Build the neighbor-joining tree for each distance matrix wth neighbor:

neighbor
  • when prompted, provide the name "tiny_nogap.protdist".

  • At the interactive menu:

    • change option m to 10 for number of replicates.

    • enter 111 for random number seed

    • press Y to accept changes

cat outfile
cat outtree
  • Rename the output:

mv outtree tiny_nogap.neightree
mv outfile tiny_nogap.neighout
  • Create a consensus version of the outtree file with consense:

consense
  • when prompted, provide the name "tiny_nogap.neightree".

  • At the interactive menu, default settings are ok so type "Y"

cat outfile
cat outtree
  • Rename the output:

mv outtree tiny_nogap.neigh.constree
mv outfile tiny_nogap.neigh.consout
  • Draw the tree with drawtree:

drawtree
  • when prompted for a file enter tiny_nogap.neigh.constree

  • when prompted for a fontfile, enter:

/net/n3/data/Teaching/IAP_2010_day3/clustal/font1
NOTE: a series of different fonts are available within the phylip installation directory
  • At the interactive menu, select option V, then N to turn off preview. Then option Y

  • This results in a postscript plot of the tree. rename it to:

mv plotfile tiny_nogap.tree.ps
  • The contents of this file can be viewed with photo software like but it looks like this:

  • The bootstrap values can be viewed in the file tiny_nogap.neigh.constree. Or graphicall by opening this file with NJ-plot. With branch lengths selected, the view looks like this:

Last updated

Massachusetts Institute of Technology