19 #ifndef _biomcmc_genetree_h_ 20 #define _biomcmc_genetree_h_ 35 int *distance, *minmax;
68 int size, spsize, spr, spr_extra, rf, hdist, hdist_reduced;
69 int n_g, n_s, n_agree, n_disagree;
70 bipartition *g_split, *s_split, *agree, *disagree, *sp0;
80 void del_genetree (genetree gtre);
83 void del_speciestree (speciestree sptre);
speciestree new_speciestree(topology species, int *order_of_species_names)
Allocate space for new speciestree_struct, given a species topology and optionally the order of speci...
Definition: genetree.c:76
int ref_counter
Length+lexico order of sptree leaf names (not used unless added by user, when arbitrary leaf ordering...
Definition: genetree.h:44
Definition: genetree.h:66
void genetree_reconcile_speciestree(genetree gtre, speciestree sptre)
<debug function>=""> dups.loss, ils calculation; accepts unseen speciestree_struct (i...
Definition: genetree.c:123
int count_species_in_index_species_gene(int *sp_id, int max_sp, int n_sp_id)
from gene-species map index, count number of distinct species represented
Definition: reconciliation.c:96
mapping between gene tree nodes (this) and (external) species tree nodes
Definition: genetree.h:48
topol_node * map_u
Mapping of all nodes from gene to species (the first gene::nnodes are fixed)
Definition: genetree.h:51
Definition: lowlevel.h:71
void genetree_dSPR_speciestree(genetree gtre, speciestree sptre, int level)
<debug function>=""> dSPR (level > 1), hdist (level > 0), and RF distances; doesn't need to update sp...
Definition: genetree.c:130
genetree new_genetree(topology gene, speciestree sptre)
Allocate space for new genetree_struct, given a gene topology and a specestree_struct.
Definition: genetree.c:38
Definition: genetree.h:29
Information of a node (binary tree).
Definition: topology_common.h:35
int * spnames_order
triangular matrix of topol_nodes (LCA between topol_node::id (i-1) and j) in one dimension ...
Definition: genetree.h:43
int sp_size
how many copies of each species are present in this gene (used by deepcoal)
Definition: genetree.h:52
UPGMA and bioNJ from (onedimensional representation of) distance matrices.
int n_g
spr, extra prunes for spr, rf distances and hdist=assignment cost
Definition: genetree.h:69
Definition: genetree.h:39
void genetree_speciestree_distances(genetree gtre, speciestree sptre)
calculates all (discrete) distances and update min and max
Definition: genetree.c:107
Bit-string representation of splits.
Definition: bipartition.h:30
Binary unrooted topology (rooted at leaf with ID zero)
Definition: topology_common.h:47