TreeNode 1.5.2
A library to manipulate phylogenetic trees
|
Contains methods to read and write trees in the NCBI ASN.1 text format. More...
Static Public Member Functions | |
static IEnumerable< TreeNode > | ParseTrees (string inputFile) |
Parses a tree from an NCBI ASN.1 text format file. Note that the tree can only contain a single file, and this method will always return a collection with a single element. More... | |
static IEnumerable< TreeNode > | ParseTrees (Stream inputStream, bool keepOpen=false) |
Parses a tree from an NCBI ASN.1 text format file. Note that the tree can only contain a single file, and this method will always return a collection with a single element. More... | |
static List< TreeNode > | ParseAllTrees (string inputFile) |
Parses a tree from an NCBI ASN.1 text format file. Note that the tree can only contain a single file, and this method will always return a list with a single element. More... | |
static List< TreeNode > | ParseAllTrees (Stream inputStream, bool keepOpen=false) |
Parses a tree from an NCBI ASN.1 text format file. Note that the tree can only contain a single file, and this method will always return a list with a single element. More... | |
static TreeNode | ParseTree (string source) |
Parses a tree from an NCBI ASN.1 format string into a TreeNode object. More... | |
static TreeNode | ParseTree (TextReader reader) |
Parses a tree from a TextReader that reads an NCBI ASN.1 format string into a TreeNode object. More... | |
static void | WriteTree (TreeNode tree, string outputFile, string treeType=null, string label=null) |
Writes a TreeNode to a file in NCBI ASN.1 text format. More... | |
static void | WriteTree (TreeNode tree, Stream outputStream, bool keepOpen=false, string treeType=null, string label=null) |
Writes a TreeNode to a file in NCBI ASN.1 text format. More... | |
static void | WriteAllTrees (IEnumerable< TreeNode > trees, Stream outputStream, bool keepOpen=false, string treeType=null, string label=null) |
Writes a collection of TreeNodes to a file in NCBI ASN.1 text format. Note that only one tree can be saved in each file; if the collection contains more than one tree an exception will be thrown. More... | |
static void | WriteAllTrees (IEnumerable< TreeNode > trees, string outputFile, string treeType=null, string label=null) |
Writes a collection of TreeNodes to a file in NCBI ASN.1 text format. Note that only one tree can be saved in each file; if the collection contains more than one tree an exception will be thrown. More... | |
static void | WriteAllTrees (List< TreeNode > trees, Stream outputStream, bool keepOpen=false, string treeType=null, string label=null) |
Writes a list of TreeNodes to a file in NCBI ASN.1 text format. Note that only one tree can be saved in each file; if the tree contains more than one tree an exception will be thrown. More... | |
static void | WriteAllTrees (List< TreeNode > trees, string outputFile, string treeType=null, string label=null) |
Writes a list of TreeNodes to a file in NCBI ASN.1 text format. Note that only one tree can be saved in each file; if the list contains more than one tree an exception will be thrown. More... | |
static string | WriteTree (TreeNode tree, string treeType=null, string label=null) |
Writes a TreeNode to a string in NCBI ASN.1 text format. More... | |
Contains methods to read and write trees in the NCBI ASN.1 text format.
Definition at line 12 of file NcbiAsnText.cs.
|
static |
Parses a tree from an NCBI ASN.1 text format file. Note that the tree can only contain a single file, and this method will always return a list with a single element.
inputStream | The Stream from which the file should be read. |
keepOpen | Determines whether the stream should be disposed at the end of this method or not. |
Definition at line 52 of file NcbiAsnText.cs.
|
static |
Parses a tree from an NCBI ASN.1 text format file. Note that the tree can only contain a single file, and this method will always return a list with a single element.
inputFile | The path to the input file. |
Definition at line 40 of file NcbiAsnText.cs.
|
static |
Parses a tree from an NCBI ASN.1 format string into a TreeNode object.
source | The NCBI ASN.1 format tree string. |
Definition at line 63 of file NcbiAsnText.cs.
|
static |
Parses a tree from a TextReader that reads an NCBI ASN.1 format string into a TreeNode object.
reader | The TextReader that reads the NCBI ASN.1 format string. |
Definition at line 74 of file NcbiAsnText.cs.
|
static |
Parses a tree from an NCBI ASN.1 text format file. Note that the tree can only contain a single file, and this method will always return a collection with a single element.
inputStream | The Stream from which the file should be read. |
keepOpen | Determines whether the stream should be disposed at the end of this method or not. |
Definition at line 30 of file NcbiAsnText.cs.
|
static |
Parses a tree from an NCBI ASN.1 text format file. Note that the tree can only contain a single file, and this method will always return a collection with a single element.
inputFile | The path to the input file. |
Definition at line 19 of file NcbiAsnText.cs.
|
static |
Writes a collection of TreeNodes to a file in NCBI ASN.1 text format. Note that only one tree can be saved in each file; if the collection contains more than one tree an exception will be thrown.
trees | The collection of trees to write. If this contains more than one tree, an exception will be thrown. |
outputStream | The Stream on which the tree should be written. |
keepOpen | Determines whether the outputStream should be kept open after the end of this method. |
treeType | An optional value for the treetype property defined in the NCBI ASN.1 tree format. |
label | An optional value for the label property defined in the NCBI ASN.1 tree format. |
Definition at line 359 of file NcbiAsnText.cs.
|
static |
Writes a collection of TreeNodes to a file in NCBI ASN.1 text format. Note that only one tree can be saved in each file; if the collection contains more than one tree an exception will be thrown.
trees | The collection of trees to write. If this contains more than one tree, an exception will be thrown. |
outputFile | The path to the output file. |
treeType | An optional value for the treetype property defined in the NCBI ASN.1 tree format. |
label | An optional value for the label property defined in the NCBI ASN.1 tree format. |
Definition at line 386 of file NcbiAsnText.cs.
|
static |
Writes a list of TreeNodes to a file in NCBI ASN.1 text format. Note that only one tree can be saved in each file; if the tree contains more than one tree an exception will be thrown.
trees | The list of trees to write. If this contains more than one tree, an exception will be thrown. |
outputStream | The Stream on which the tree should be written. |
keepOpen | Determines whether the outputStream should be kept open after the end of this method. |
treeType | An optional value for the treetype property defined in the NCBI ASN.1 tree format. |
label | An optional value for the label property defined in the NCBI ASN.1 tree format. |
Definition at line 414 of file NcbiAsnText.cs.
|
static |
Writes a list of TreeNodes to a file in NCBI ASN.1 text format. Note that only one tree can be saved in each file; if the list contains more than one tree an exception will be thrown.
trees | The list of trees to write. If this contains more than one tree, an exception will be thrown. |
outputFile | The path to the output file. |
treeType | An optional value for the treetype property defined in the NCBI ASN.1 tree format. |
label | An optional value for the label property defined in the NCBI ASN.1 tree format. |
Definition at line 433 of file NcbiAsnText.cs.
|
static |
Writes a TreeNode to a file in NCBI ASN.1 text format.
tree | The tree to write. |
outputStream | The Stream on which the tree should be written. |
keepOpen | Determines whether the outputStream should be kept open after the end of this method. |
treeType | An optional value for the treetype property defined in the NCBI ASN.1 tree format. |
label | An optional value for the label property defined in the NCBI ASN.1 tree format. |
Definition at line 345 of file NcbiAsnText.cs.
|
static |
Writes a TreeNode to a file in NCBI ASN.1 text format.
tree | The tree to write. |
outputFile | The path to the output file. |
treeType | An optional value for the treetype property defined in the NCBI ASN.1 tree format. |
label | An optional value for the label property defined in the NCBI ASN.1 tree format. |
Definition at line 332 of file NcbiAsnText.cs.
|
static |
Writes a TreeNode to a string in NCBI ASN.1 text format.
tree | The tree to write. |
treeType | An optional value for the treetype property defined in the NCBI ASN.1 tree format. |
label | An optional value for the label property defined in the NCBI ASN.1 tree format. |
Definition at line 452 of file NcbiAsnText.cs.