biomcmc-lib  0.1
low level library for phylogenetic analysis
Data Structures | Typedefs | Functions
read_newick_trees.h File Reference

Low-level functions for reading newick strings. More...

#include "topology_distance.h"
#include "nexus_common.h"
Include dependency graph for read_newick_trees.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  newick_node_struct
 newick trees have minimal information, unlike topology_struct More...
struct  newick_tree_struct


typedef struct newick_node_structnewick_node
typedef struct newick_tree_structnewick_tree


newick_tree new_newick_tree (int nleaves)
 Allocates memory for newick_tree_struct.
void del_newick_tree (newick_tree T)
 Frees memory used by tree.
void copy_topology_from_newick_tree (topology tree, newick_tree nwk_tree, bool create_tree_taxlabel)
 Copy information from newick_tree struct to topology_struct; newick_space copies taxlabels but topology_space (from nexus files) share the taxlabel and thus don't copy from newick_tree_struct.
newick_tree new_newick_tree_from_string (char *external_string)
 Creates newick_tree structure.
newick_node subtree_newick_tree (newick_tree tree, char *lsptr, char *rsptr, int *node_id, newick_node up)
 Recursive function that creates a node based on parenthetic structure.
int number_of_leaves_in_newick (char **string, int *number_branches)
 Counts the number of leaves and resolves (one) trifurcation of tree string.

Detailed Description

Low-level functions for reading newick strings.

Currently does not check for duplicated trees, or same leaf names on a tree