GenotypeLists.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __GENOTYPE_ELIMINATION__
00019 #define __GENOTYPE_ELIMINATION__
00020
00021 #include "Pedigree.h"
00022
00023 class GenotypeList
00024 {
00025 public:
00026
00027 IntArray allele1, allele2;
00028 IntArray alleles;
00029
00030 bool ignore;
00031 int checked;
00032
00033 GenotypeList();
00034
00035 static bool EliminateGenotypes(Pedigree & ped, Family * family, int marker);
00036
00037 void Dimension(int genotypes);
00038 void Delete(int genotype);
00039
00040 bool Matches(int genotype, int allele);
00041 bool Matches(int allele);
00042
00043 int SaveGenotype(int genotype);
00044 void SetGenotype(int genotype, int al1, int al2);
00045
00046 private:
00047 static void InitializeList(GenotypeList * list, Pedigree & p, Family * f, int marker);
00048 static bool PairwiseCheck(GenotypeList * list, Pedigree & p, Family * f);
00049 static bool FamilyCheck(GenotypeList * list, Pedigree & p, Family * f);
00050
00051 static bool CheckTrio(GenotypeList * list, int fatid, int motid, int child, int i, int j, int k);
00052 static bool TrimParent(GenotypeList * list, Person & person, int fatid, int motid);
00053 static bool Cleanup(GenotypeList * list, Person & person, int fatid, int motid, int child, int geno);
00054
00055 static void Print(GenotypeList * List, Pedigree & p, Family * f, int marker);
00056 };
00057
00058
00059
00060 #endif