Data Structure


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 


Data about all loci

         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 * loci;

Alleles in locus - not ordered 

typedef struct Locus_t
     int allele1;
     int allele2;

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* PedigreeGraph;          /* size=number of people in the pedigree */

Neighbours in connected component (look Algorithm)

        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 **FoundersGraph;

Possible assignments for founders meioses 

      int A;
      int B;
     Bool if_visitedA;
      Bool if_visitedB;

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