# PHYLIP

PHYLogeny Inference Package (PHYLIP) is a free computational phylogenetics package of programs for inferring evolutionary trees (phylogenies). It consists of 65 portable programs, i.e., the source code is written in the programming language C. As of version 3.696, it is licensed as open-source software; versions 3.695 and older were proprietary software freeware. Releases occur as source code, and as precompiled executables for many operating systems including Windows (95, 98, ME, NT, 2000, XP, Vista), Mac OS 8, Mac OS 9, OS X, Linux (Debian, Red Hat); and FreeBSD from FreeBSD.org. Full documentation is written for all the programs in the package and is included therein. The programs in the phylip package were written by Professor Joseph Felsenstein, of the Department of Genome Sciences and the Department of Biology, University of Washington, Seattle.
Methods (implemented by each program) that are available in the package include parsimony, distance matrix, and likelihood methods, including bootstrapping and consensus trees. Data types that can be handled include molecular sequences, gene frequencies, restriction sites and fragments, distance matrices, and discrete characters.
Each program is controlled through a menu, which asks users which options they want to set, and allows them to start the computation. The data is read into the program from a text file, which the user can prepare using any word processor or text editor (but this text file cannot be in the special format of the word processor, it must instead be in flat ASCII or text only format). Some sequence analysis programs such as the ClustalW alignment program can write data files in the PHYLIP format. Most of the programs look for the data in a file called infile . If the phylip programs do not find this file, they then ask the user to type in the file name of the data file.

## File format

The component programs of phylip use several different formats, all of which are relatively simple. Programs for the analysis of DNA sequence alignments, protein sequence alignments, or discrete characters (e.g., morphological data) can accept those data in sequential or interleaved format, as shown below.
Sequential format:
Interleaved format:
The numbers are the number of taxa (different species in the example shown above) followed by the number of characters (aligned nucleotides or amino acids in the case of molecular sequences). Restriction site data must include the number of enzymes as well.
Names are limited to 10 characters by default and must be blank-filled to be of that length and followed immediately by the character data using one-letter codes, although the 10 character limit name can be changed by a minor modification of the code (by changing nmlngth in phylip.h and recompiling). All printable ASCII/ISO characters are allowed names, except for parentheses ("(" and ")"), square brackets ("[" and "]"), colon (":"), semicolon (";") and comma (","). The spaces embedded in the alignment are ignored.
Many programs for phylogenetic analyses, including the commonly-used RAxML and IQ-TREE programs, use the phylip format or a minor modification of that format called the relaxed phylip format.
Relaxed phylip format (sequential):
The primary difference in relaxed phylip format is the absence of the 10 character limit and the removal of the need to blank fill names to reach that length (although filling names to start the character matrix at the same position can improve readability for user). This example of relaxed uses underscores rather than spaces in the names and uses spaces between the names and the aligned character data; it is often good practice to avoid white space within taxon names and to separate the character data from the name when generating files. Like strict phylip format files, relaxed phylip format files can be in interleaved format and include spaces and endlines within the sequence data.
The programs that use distance data, like the neighbor program that implements the neighbor-joining method, also use a simple distance matrix format the includes only the number of taxa, their names, and numerical values for the distances:
Phylip distance matrix:
The number indicates the number of taxa and same limitations for taxon names exist. Note that this matrix is symmetric and the diagonal has values of 0 (since the distance between a taxon and itself is zero by definition).
Programs that use trees as input accept the trees in Newick format, an informal standard agreed to in 1986 by authors of seven major phylogeny packages. Output is written onto files with names like outfile and outtree. Trees written onto outtree are in the Newick format.

## Component programs

Programs listed in PHYLIP :
| Program name | Description |
| protpars | Estimates phylogenies of peptide sequences using the parsimony method |
| dnapars | Estimates phylogenies of DNA sequences using the parsimony method |
| dnapenny | DNA parsimony branch and bound method, finds all of the most parsimonious phylogenies for nucleic acid sequences by branch-and-bound search |
| dnamove | Interactive construction of phylogenies from nucleic acid sequences, with their evaluation by DNA parsimony method, with compatibility and display of reconstructed ancestral bases |
| dnacomp | Estimates phylogenies from nucleic acid sequence data using the compatibility criterion |
| dnaml | Estimates phylogenies from nucleotide sequences using the maximum likelihood method |
| dnamlk | DNA maximum likelihood method with molecular clock; using both dnaml and dnamlk together permits a likelihood-ratio test for the molecular clock hypothesis |
| proml | Estimates phylogenies from protein amino acid sequences by using the maximum likelihood method |
| promlk | Protein sequence maximum likelihood method with molecular clock |
| restml | Estimation of phylogenies by maximum likelihood using restriction sites data; not from restriction fragments but from the presence or absence of individual sites |
| dnainvar | For nucleic acid sequence data on four species, computes Lake's and Cavender's phylogenetic invariants, which test alternative tree topologies |
| dnadist | DNA distance method which computes four different distances between species from nucleic acid sequences; distances can then be used in the distance matrix programs |
| protdist | Protein sequence distance method which computes a distance measure for sequences, using maximum likelihood estimates based on the Dayhoff PAM matrix, Kimura's 1983 approximation to it, or a model based on genetic code plus a constraint on changing to a different category of amino acid |
| restdist | Distances calculated from restriction sites data or restriction fragments data |
| seqboot | Bootstrapping-jackknifing program; reads in a data set, and emits multiple data sets from it by bootstrap resampling |
| fitch | Fitch-Margoliash distance matrix method; estimates phylogenies from distance matrix data under the additive tree model according to which the distances are expected to equal the sums of branch lengths between species |
| kitsch | Fitch-Margoliash distance matrix method with molecular clock; estimates phylogenies from distance matrix data under the ultrametric model which is the same as the additive tree model except an evolutionary clock is assumed |
| neighbor | Implementation of the methods neighbor joining and UPGMA |
| contml | Maximum likelihood continuous characters and gene frequencies; estimates phylogenies from gene frequency data by maximum likelihood under a model in which all divergence is due to genetic drift in the absence of new mutations; also does maximum likelihood analysis of continuous characters that evolve by a Brownian Motion model, assuming that the characters evolve at equal rates and in an uncorrelated fashion; does not account for character correlations |
| contrast | Reads a tree from a tree file, and a data set with continuous characters data, and emits the independent contrasts for those characters, for use in any multivariate statistics package |
| gendist | Genetic distance program which computes one of three different genetic distance formulas from gene frequency data |
| pars | Unordered multistate discrete-characters parsimony method |
| mix | Estimates phylogenies by some parsimony methods for discrete character data with two states (0, 1); allows using methods: Wagner, Camin-Sokal, or arbitrary mixes |
| penny | Branch and bound mixed method which finds all of the most parsimonious phylogenies for discrete-character data with two states, for the Wagner, Camin-Sokal, and mixed parsimony criteria using the branch-and-bound method of exact search |
| move | Interactive construction of phylogenies from discrete character data with two states (0, 1); evaluates parsimony and compatibility criteria for those phylogenies and displays reconstructed states throughout the tree |
| dollop | Estimates phylogenies by the Dollo or polymorphism parsimony criteria for discrete character data with two states (0, 1) |
| dolpenny | Finds all or most parsimonious phylogenies for discrete-character data with two states, for the Dollo or polymorphism parsimony criteria using the branch-and-bound method of exact search |
| dolmove | Interactive construction of phylogenies from discrete character data with two states (0, 1) using the Dollo or polymorphism parsimony criteria; evaluates parsimony and compatibility criteria for those phylogenies; displays reconstructed states throughout the tree |
| clique | Finds the largest clique of mutually compatible characters, and the phylogeny which they recommend, for discrete character data with two states (0, 1); the largest clique (or all cliques within a given size range of the largest one) are found by a fast branch and bound search method |
| factor | Character recoding program which takes discrete multistate data with character state trees and emits the corresponding data set with two states (0, 1) |
| drawgram | Rooted tree drawing program which plots rooted phylogenies, cladograms, and phenograms in a wide variety of user-controllable formats. The program is interactive and allows previewing of the tree on PC or Macintosh graphics screens, and Tektronix or Digital graphics terminals. |
| drawtree | Unrooted tree drawing program similar to DRAWGRAM, but plots phylogenies |
| consense | Consensus tree program which computes trees by the majority-rule tree method, which also allows easily finding the strict consensus tree; unable to compute Adams consensus tree |
| treedist | Computes the Robinson–Foulds symmetric difference distance between trees, which allows differences in tree topology |
| retree | Interactive tree rearrangement program which reads in a tree (with branch lengths if needed) and allows rerooting the tree, to flip branches, to change species names and branch lengths, and then write the result out; can be used to convert between rooted and unrooted trees |