CAFE
Computational Analysis of gene Family Evolution
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
cafe_family.c File Reference
#include "cafe.h"
#include <stdlib.h>
#include <stdio.h>
#include <mathfunc.h>
#include <memalloc.h>
#include <utils.h>

Macros

#define E_NOT_SYNCHRONIZED   1
 
#define E_INCONSISTENT_SIZE   2
 

Functions

void __cafe_famliy_check_the_pattern (pCafeFamily pcf)
 Sets ref on the family meaning an index to a lower numbered family with the same species count for each species. More...
 
int cafe_family_split_cvfiles_byfamily (pCafeParam param, int cv_fold)
 
void cafe_family_split_cvfiles_byspecies (pCafeParam param)
 
int cafe_family_set_species_index (pCafeFamily pcf, pCafeTree pcafe)
 Synchronize a family and tree together. More...
 
int cafe_family_get_species_index (pCafeFamily pcf, char *speciesname)
 
int sync_sanity_check (pCafeFamily pcf, pCafeTree pcafe)
 
void cafe_family_set_size (pCafeFamily pcf, pCafeFamilyItem pitem, pCafeTree pcafe)
 Copy sizes of an individual gene family into the tree. More...
 
void cafe_family_set_size_with_family_forced (pCafeFamily pcf, int idx, pCafeTree pcafe)
 
void cafe_family_set_size_with_family (pCafeFamily pcf, int idx, pCafeTree pcafe)
 
void cafe_family_set_truesize_with_family (pCafeFamily pcf, int idx, pCafeTree pcafe)
 
void cafe_family_set_size_by_species (char *speciesname, int size, pCafeTree pcafe)
 
void init_family_size (family_size_range *fs, int max)
 

Macro Definition Documentation

#define E_INCONSISTENT_SIZE   2
#define E_NOT_SYNCHRONIZED   1

Function Documentation

void __cafe_famliy_check_the_pattern ( pCafeFamily  pcf)

Sets ref on the family meaning an index to a lower numbered family with the same species count for each species.

int cafe_family_get_species_index ( pCafeFamily  pcf,
char *  speciesname 
)
void cafe_family_set_size ( pCafeFamily  pcf,
pCafeFamilyItem  pitem,
pCafeTree  pcafe 
)

Copy sizes of an individual gene family into the tree.

Takes the given gene family and copies the size of the family in the species into the tree node that corresponds to that species

Side effect is to set the familysize member for each node in the tree, but since that is a convenience variable it shouldn't make any difference

void cafe_family_set_size_by_species ( char *  speciesname,
int  size,
pCafeTree  pcafe 
)
void cafe_family_set_size_with_family ( pCafeFamily  pcf,
int  idx,
pCafeTree  pcafe 
)
void cafe_family_set_size_with_family_forced ( pCafeFamily  pcf,
int  idx,
pCafeTree  pcafe 
)
int cafe_family_set_species_index ( pCafeFamily  pcf,
pCafeTree  pcafe 
)

Synchronize a family and tree together.

Sets the value of index in pcf to the node index in the tree of the leaf with the matching species ID.

Returns
0 on success, or -1 if there is a species in the tree with no matching species in the family
void cafe_family_set_truesize_with_family ( pCafeFamily  pcf,
int  idx,
pCafeTree  pcafe 
)
int cafe_family_split_cvfiles_byfamily ( pCafeParam  param,
int  cv_fold 
)
void cafe_family_split_cvfiles_byspecies ( pCafeParam  param)
void init_family_size ( family_size_range fs,
int  max 
)
int sync_sanity_check ( pCafeFamily  pcf,
pCafeTree  pcafe 
)