libStatGen Software 1
GenotypeLists.h
1/*
2 * Copyright (C) 2010 Regents of the University of Michigan
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#ifndef __GENOTYPE_ELIMINATION__
19#define __GENOTYPE_ELIMINATION__
20
21#include "Pedigree.h"
22
24{
25public:
26
27 IntArray allele1, allele2;
28 IntArray alleles;
29
30 bool ignore;
31 int checked;
32
34
35 static bool EliminateGenotypes(Pedigree & ped, Family * family, int marker);
36
37 void Dimension(int genotypes);
38 void Delete(int genotype);
39
40 bool Matches(int genotype, int allele);
41 bool Matches(int allele);
42
43 int SaveGenotype(int genotype);
44 void SetGenotype(int genotype, int al1, int al2);
45
46private:
47 static void InitializeList(GenotypeList * list, Pedigree & p, Family * f, int marker);
48 static bool PairwiseCheck(GenotypeList * list, Pedigree & p, Family * f);
49 static bool FamilyCheck(GenotypeList * list, Pedigree & p, Family * f);
50
51 static bool CheckTrio(GenotypeList * list, int fatid, int motid, int child, int i, int j, int k);
52 static bool TrimParent(GenotypeList * list, Person & person, int fatid, int motid);
53 static bool Cleanup(GenotypeList * list, Person & person, int fatid, int motid, int child, int geno);
54
55 static void Print(GenotypeList * List, Pedigree & p, Family * f, int marker);
56};
57
58
59
60#endif