28#ifndef CLUSTALO_MUSCLE_CLUSTALO_TREE_H
29#define CLUSTALO_MUSCLE_CLUSTALO_TREE_H
39static const uint NULL_NEIGHBOR = UINT_MAX;
103 const uint *Right,
const float *LeftLength,
const float* RightLength,
104 const uint *LeafIds,
char **LeafNames);
uint GetRootNodeIndex(tree_t *tree)
Definition muscle_tree.c:1707
uint FirstDepthFirstNode(tree_t *tree)
returns first leaf node for a depth-first traversal of tree
Definition muscle_tree.c:196
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
void LogTree(tree_t *tree, FILE *fp)
Definition muscle_tree.c:1559
double GetEdgeLength(uint uNodeIndex1, uint uNodeIndex2, tree_t *tree)
Definition muscle_tree.c:555
void FreeMuscleTree(tree_t *tree)
Definition muscle_tree.c:279
void TreeValidate(tree_t *tree)
Definition muscle_tree.c:719
uint NextDepthFirstNode(uint nodeindex, tree_t *tree)
returns next leaf node index for depth-first traversal of tree
Definition muscle_tree.c:226
void SetLeafId(tree_t *tree, uint uNodeIndex, uint uId)
Definition muscle_tree.c:1694
uint GetNodeCount(tree_t *tree)
Definition muscle_tree.c:1656
uint LeafIndexToNodeIndex(uint uLeafIndex, tree_t *prTree)
Definition muscle_tree.c:1722
uint GetLeafId(uint nodeindex, tree_t *tree)
Definition muscle_tree.c:156
char * GetLeafName(unsigned uNodeIndex, tree_t *tree)
Definition muscle_tree.c:173
bool IsRooted(tree_t *tree)
check if tree is a rooted tree
Definition muscle_tree.c:267
uint GetLeft(uint nodeindex, tree_t *tree)
Definition muscle_tree.c:119
int MuscleTreeFromFile(tree_t *tree, char *ftree)
Definition muscle_tree.c:874
bool IsLeaf(uint nodeindex, tree_t *tree)
check if given node is a leaf node
Definition muscle_tree.c:460
uint GetRight(uint nodeindex, tree_t *tree)
Definition muscle_tree.c:138
unsigned int uint
Definition muscle_tree.h:36
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
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
bool IsRoot(uint uNodeIndex, tree_t *tree)
Definition muscle_tree.c:475
uint GetParent(unsigned uNodeIndex, tree_t *tree)
Definition muscle_tree.c:506
uint GetLeafCount(tree_t *tree)
Definition muscle_tree.c:1642
guide-tree structure
Definition muscle_tree.h:59
uint m_uRootNodeIndex
Definition muscle_tree.h:97
uint * m_uNeighbor1
Definition muscle_tree.h:63
double * m_dEdgeLength1
Definition muscle_tree.h:72
double * m_dEdgeLength2
Definition muscle_tree.h:73
uint m_uCacheCount
Definition muscle_tree.h:61
char ** m_ptrName
Definition muscle_tree.h:88
double * m_dEdgeLength3
Definition muscle_tree.h:74
bool * m_bHasEdgeLength2
Definition muscle_tree.h:69
uint m_uNodeCount
Definition muscle_tree.h:60
uint * m_Ids
Definition muscle_tree.h:94
bool * m_bHasEdgeLength1
Definition muscle_tree.h:68
bool * m_bHasEdgeLength3
Definition muscle_tree.h:70
uint * m_uNeighbor3
Definition muscle_tree.h:65
uint * m_uNeighbor2
Definition muscle_tree.h:64
bool m_bRooted
Definition muscle_tree.h:96