Clustal Omega 1.2.4
weights.c File Reference
#include <assert.h>
#include "log.h"
#include "muscle_tree.h"
#include "weights.h"
Include dependency graph for weights.c:

Functions

uint CountLeaves (uint *puLeavesUnderNode, tree_t *prTree, uint uNodeIndex)
 FIXME.
 
void Normalise (double *p, uint n)
 Normalise values in a double array to values between 0 and 1.
 
int CalcClustalWeights (double **pdWeights_p, tree_t *prTree)
 Calculate "Clustal" weights from a tree.
 

Function Documentation

◆ CalcClustalWeights()

int CalcClustalWeights ( double ** pdWeights_p,
tree_t * prTree )

Calculate "Clustal" weights from a tree.

FIXME see doc in muscle:clwwt.cpp

Parameters
[out]pdWeights_pWill contain a weight for each leaf/sequence. Allocated here. User has to free
[in]prTreeTree to derive weights from
Returns
0 on success, non-zero otherwise
Note
Largely copied from Muscle3.7: clwwt.cpp:CalcClustalWWeights()
Warning
FIXME Not sure if Muscle routines are most efficient here. Couldn't we do all this while traversing the tree and thereby safe time?

◆ CountLeaves()

uint CountLeaves ( uint * puLeavesUnderNode,
tree_t * prTree,
uint uNodeIndex )

FIXME.

Parameters
[out]puLeavesUnderNodeFIXME
[in]prTreeFIXME
[in]uNodeIndexFIXME
Returns
The return value
Note
see Muscle3.7:clwwt.cpp

◆ Normalise()

void Normalise ( double * p,
uint n )

Normalise values in a double array to values between 0 and 1.

Parameters
[out]pdouble array with n elements
[in]nnumber of elements in p
Note
From Muscle3.7: intmath.cpp:Normalize()