Go to the documentation of this file.
28 #ifndef CLUSTALO_MUSCLE_CLUSTALO_TREE_H
29 #define CLUSTALO_MUSCLE_CLUSTALO_TREE_H
39 static const uint NULL_NEIGHBOR = UINT_MAX;
103 const uint *Right,
const float *LeftLength,
const float* RightLength,
104 const uint *LeafIds,
char **LeafNames);
void MuscleTreeToFile(FILE *fp, tree_t *tree)
write a muscle tree to a file in newick format (distances and all names)
Definition: muscle_tree.c:432
bool m_bRooted
Definition: muscle_tree.h:96
uint m_uCacheCount
Definition: muscle_tree.h:61
uint GetNodeCount(tree_t *tree)
Definition: muscle_tree.c:1656
uint FirstDepthFirstNode(tree_t *tree)
returns first leaf node for a depth-first traversal of tree
Definition: muscle_tree.c:196
char * GetLeafName(unsigned uNodeIndex, tree_t *tree)
Definition: muscle_tree.c:173
uint GetRootNodeIndex(tree_t *tree)
Definition: muscle_tree.c:1707
double * m_dEdgeLength1
Definition: muscle_tree.h:72
bool IsRooted(tree_t *tree)
check if tree is a rooted tree
Definition: muscle_tree.c:267
int MuscleTreeFromFile(tree_t *tree, char *ftree)
Definition: muscle_tree.c:874
uint LeafIndexToNodeIndex(uint uLeafIndex, tree_t *prTree)
Definition: muscle_tree.c:1722
uint m_uNodeCount
Definition: muscle_tree.h:60
uint * m_Ids
Definition: muscle_tree.h:94
uint NextDepthFirstNode(uint nodeindex, tree_t *tree)
returns next leaf node index for depth-first traversal of tree
Definition: muscle_tree.c:226
void FreeMuscleTree(tree_t *tree)
Definition: muscle_tree.c:279
char ** m_ptrName
Definition: muscle_tree.h:88
void MuscleTreeCreate(tree_t *tree, uint uLeafCount, uint uRoot, const uint *Left, const uint *Right, const float *LeftLength, const float *RightLength, const uint *LeafIds, char **LeafNames)
create a muscle tree
Definition: muscle_tree.c:367
bool IsRoot(uint uNodeIndex, tree_t *tree)
Definition: muscle_tree.c:475
unsigned int uint
Definition: muscle_tree.h:36
void TreeValidate(tree_t *tree)
Definition: muscle_tree.c:719
uint GetLeafCount(tree_t *tree)
Definition: muscle_tree.c:1642
void SetLeafId(tree_t *tree, uint uNodeIndex, uint uId)
Definition: muscle_tree.c:1694
void LogTree(tree_t *tree, FILE *fp)
Definition: muscle_tree.c:1559
guide-tree structure
Definition: muscle_tree.h:59
uint * m_uNeighbor3
Definition: muscle_tree.h:65
uint GetParent(unsigned uNodeIndex, tree_t *tree)
Definition: muscle_tree.c:506
double * m_dEdgeLength3
Definition: muscle_tree.h:74
uint GetLeafId(uint nodeindex, tree_t *tree)
Definition: muscle_tree.c:156
double GetEdgeLength(uint uNodeIndex1, uint uNodeIndex2, tree_t *tree)
Definition: muscle_tree.c:555
bool IsLeaf(uint nodeindex, tree_t *tree)
check if given node is a leaf node
Definition: muscle_tree.c:460
bool * m_bHasEdgeLength2
Definition: muscle_tree.h:69
uint m_uRootNodeIndex
Definition: muscle_tree.h:97
double * m_dEdgeLength2
Definition: muscle_tree.h:73
uint GetLeft(uint nodeindex, tree_t *tree)
Definition: muscle_tree.c:119
uint * m_uNeighbor2
Definition: muscle_tree.h:64
uint GetRight(uint nodeindex, tree_t *tree)
Definition: muscle_tree.c:138
bool * m_bHasEdgeLength3
Definition: muscle_tree.h:70
bool * m_bHasEdgeLength1
Definition: muscle_tree.h:68
uint * m_uNeighbor1
Definition: muscle_tree.h:63
void AppendTree(tree_t *prDstTree, uint uDstTreeNodeIndex, tree_t *prSrcTree)
Append a (source) tree to a (dest) tree to a given node which will be replaced. All other nodes in th...
Definition: muscle_tree.c:1778