Data Structure

Globals

int PedigreeSize;                       -  Number of people 
int NumOfFounders;                 -  Number  of people in the family that don't have  parents in the pedigree
int *Founders;                          -  Array with numbers of founders 
int NumOfNonFounders;          -  Number  of People in the family that their  parents in the pedigree
int *NonFounders;                   -  Array with numbers of nonFounders *
int* FirstGen;                           -  People that first children of founders
int NumOfMeioses;                  -  2*NumOfNonFounders 
int Possibilities;                         - pow(2,NumOfMeioses) -NumOfFounders
int NumOfLocuses;                  - Number of Loci in pedigree
double * Recomb_values;        - n-1 recombination values 
double **Thetas;                     - for each recombination value - holds all (=possibilities) values 

int *Mask;                               - Mask[i] gets i bit in the integer -where i is MSB
int *MaskLSB;                       - Mask[i] gets i bit in the integer -where i is LSB  
int *AlleleGraph;                     - For each nonfounder allele from which founder allele it rised 

int curLocus;                           - Current Locus 
int DesiaseLocus;                    - Number of Desiase Locus
int vector ;                               - Current inheretence vector 


MATRIX ProbabilityLocus;     - Probability(for each inheretance vector) for each numerated Locus
VECTOR ProbabilityDesiase;  - Probability(for each inheretance vector) for dasease Locus 

Structs

Data about all loci

 LOCUS_DATA{
         int locus_type;             /* 1-affected 3- numerated */
        double *frequencies;     /* gene frequencies */
        int num_of_freq;            /* for each gene -how many different values it can receive */
        int num_of_liab;             /* for affected allele */
        double *penetrances[3] ;/* for affected allele */
}LOCUS_DATA;
LOCUS_DATA * loci;

Alleles in locus - not ordered 

typedef struct Locus_t
{
     int allele1;
     int allele2;
}Locus;


Data about pedigree member


typedef struct Pedigree_t
{
    int father;
    int mother;
    int founder;    /* 1- founder   0-nonFounder                */
    int num;         /*  out of founders/nonfounders,starting 0 */
    int sex;          /*  0-male,1-female                                 */
    int child;        /*  first child                                             */
Locus* myLocus;
}Pedigree;
Pedigree* PedigreeGraph;          /* size=number of people in the pedigree */

Neighbours in connected component (look Algorithm)


Neighbours_t 
{
        int id;                                /*  Id of Allele neighbour */
       int allele1;                           /*  two alleles that connects  this allele with it's neighbour*/
       int allele2;
       struct Neighbours_t *next; /* Pointer to next neighbour */
}Neighbours;
Neighbours **FoundersGraph;


Possible assignments for founders meioses 


Assign{
      int A;
      int B;
     Bool if_visitedA;
      Bool if_visitedB;
}Assign;

Assign *Alleles; /* vector (size=founders meioses ) of possible assignments */