Skip to content

Features

andreanasari edited this page Sep 2, 2015 · 3 revisions

In this section are explained in detail the capabilities of the library and some implementation details. PhylogeneticTrees and MSA are the two programs that use the built library.

For a preliminary overview and explanation of Phylogenetic classes visit the Introduction page.

PhylogeneticTrees

This program calculates phylogenetic trees for the sequences provided as FASTA input. It is possible to provide the scoring matrix as input or it can be dynamically calculated using global, local or freeshift alignments. Supported algorithms are UPGMA and NJ, the tree is generated in the Newick tree format.

The first step to construct a phylogenetic tree is to obtain a distance between all the input sequences. Pairwise alignments between each sequence can be performed with the algorithms package Align2:

  • With Needleman-Wunsch-Gotoh global alignment
  • With Smith-Waterman local alignment
  • With Free-shift alignment

Each alignment using the default substitution matrix Blosum 30, open gap penalty 10 and extension gap penalty 0.1. Alternatively you can specify a custom distance matrix through file.

Once you have the pairwise alignment distances are calculated in DistanceMatrix class, method calculateDistance. These scores are calculated as 1 minus the number of identities in the best alignment divided by the length of the shorter sequence. The class can be extended and is possible to override calculateDistance virtual method to obtain alternatives distances score.

From the distance matrix the hierarchical clustering can be accomplished in two ways:

  • UPGMA (Unweighted Pair Group Method with Arithmetic Mean): produce a phylogenetic rooted tree in a simple bottom-up way.
  • NJ (Neighbor joining): produce a phylogenetic unrooted tree according to the balanced minimum evolution. Optionally you can build a rooted tree with 'mid-point' method.

The phylogenetic tree is output in Newick format. To build a phylogenetic tree with UPGMA:

PhylogeneticTrees  --in input.fasta --upgma --out tree.newick

The output will be something like:

VICTOR - Phylogenetic trees generator

Start of Pairwise alignments
Aligning...

Sequences ( 1: 2) Aligned. Identity Score:  87.81 Score: 80.12
Sequences ( 1: 3) Aligned. Identity Score:  52.74 Score: 43.27
...

Performing UPGMA clustering

Exporting phylogenetic tree in the Newick format...
Writing newick file tree.newick

Clone this wiki locally