Package org.biojava.nbio.phylo
Class ForesterWrapper
java.lang.Object
org.biojava.nbio.phylo.ForesterWrapper
This class contains wrapper methods for communication between BioJava and
 forester (e.g, Data Structure conversion).
- Since:
- 4.1.1
- Author:
- Aleix Lafita
- 
Method SummaryModifier and TypeMethodDescriptionstatic org.forester.evoinference.matrix.distance.BasicSymmetricalDistanceMatrixcloneDM(org.forester.evoinference.matrix.distance.BasicSymmetricalDistanceMatrix distM) Helper function to clone a forester symmetrical DistanceMatrix.convert(MultipleSequenceAlignment<C, D> msa) Convert a BioJavaMultipleSequenceAlignmentto a foresterMsa.static StringgetNewickString(org.forester.phylogeny.Phylogeny phylo, boolean writeDistances) Convert a Phylogenetic tree to its Newick representation, so that it can be exported to an external application.
- 
Method Details- 
convertpublic static <C extends Sequence<D>,D extends Compound> org.forester.msa.Msa convert(MultipleSequenceAlignment<C, D> msa) throws IOExceptionConvert a BioJavaMultipleSequenceAlignmentto a foresterMsa. The easiest way to convert them is writting the msa as a FASTA file and then parsing it with the foresterFastaParser.- Parameters:
- msa- BioJava MultipleSequenceAlignment
- Returns:
- forester Msa object
- Throws:
- IOException- if the conversion was not possible
 
- 
getNewickStringpublic static String getNewickString(org.forester.phylogeny.Phylogeny phylo, boolean writeDistances) throws IOException Convert a Phylogenetic tree to its Newick representation, so that it can be exported to an external application.- Parameters:
- phylo- Phylogeny phylogenetic tree
- writeDistances- write the branch lengths if true
- Returns:
- Throws:
- IOException
 
- 
cloneDMpublic static org.forester.evoinference.matrix.distance.BasicSymmetricalDistanceMatrix cloneDM(org.forester.evoinference.matrix.distance.BasicSymmetricalDistanceMatrix distM) Helper function to clone a forester symmetrical DistanceMatrix.- Parameters:
- distM- forester symmetrical DistanceMatrix
- Returns:
- identical copy of the forester symmetrical DistanceMatrix
 
 
-