Package jebl.evolution.io
Class NexusExporter
java.lang.Object
jebl.evolution.io.NexusExporter
- All Implemented Interfaces:
AlignmentExporter,SequenceExporter,TreeExporter
public class NexusExporter
extends Object
implements AlignmentExporter, SequenceExporter, TreeExporter
Export sequences and trees to Nexus format.
- Version:
- $Id: NexusExporter.java 1060 2010-06-01 08:52:55Z rambaut $
- Author:
- Andrew Rambaut, Alexei Drummond, Joseph Heled
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionNexusExporter(Writer writer) NexusExporter(Writer writer, boolean writeMetaComments) NexusExporter(Writer writer, boolean writeMetaComments, boolean interleave) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidclose an existing open trees blockvoidexportAlignment(Alignment alignment) exportAlignment.voidexportMatrix(DistanceMatrix distanceMatrix) voidexportSequences(Collection<? extends Sequence> sequences) export alignment.voidexportTree(Tree tree) Export a single treevoidexportTrees(Collection<? extends Tree> trees) Export a collection of treesvoidexportTrees(Collection<? extends Tree> trees, boolean writeTaxa) voidexportTreesWithTranslation(Collection<? extends Tree> trees, Map<String, String> translationMap) static booleanisGeneratedTreeName(String name)
-
Field Details
-
treeNameAttributeKey
- See Also:
-
exportExcludeKeys
-
MAX_ROW_LENGTH
public static final int MAX_ROW_LENGTH- See Also:
-
-
Constructor Details
-
NexusExporter
-
NexusExporter
- Parameters:
writer- where export text goes
-
NexusExporter
- Parameters:
writer- where export text goes
-
-
Method Details
-
exportAlignment
exportAlignment.- Specified by:
exportAlignmentin interfaceAlignmentExporter- Parameters:
alignment- to export
-
exportSequences
public void exportSequences(Collection<? extends Sequence> sequences) throws IllegalArgumentException export alignment.- Specified by:
exportSequencesin interfaceSequenceExporter- Throws:
IllegalArgumentException
-
closeBlock
public void closeBlock()close an existing open trees block -
exportTree
Export a single tree- Specified by:
exportTreein interfaceTreeExporter- Parameters:
tree-- Throws:
IOException
-
exportTrees
Description copied from interface:TreeExporterExport a collection of trees- Specified by:
exportTreesin interfaceTreeExporter- Parameters:
trees-
-
exportTrees
-
exportTreesWithTranslation
public void exportTreesWithTranslation(Collection<? extends Tree> trees, Map<String, String> translationMap) throws IOException- Throws:
IOException
-
close
public void close()- Specified by:
closein interfaceTreeExporter
-
exportMatrix
-
isGeneratedTreeName
-