1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
|
//////////////////////////////////////////////////////////////////
// //
// PLINK (c) 2005-2007 Shaun Purcell //
// //
// This file is distributed under the GNU General Public //
// License, Version 2. Please see the file COPYING for more //
// details //
// //
//////////////////////////////////////////////////////////////////
#ifndef __WHAP_H__
#define __WHAP_H__
#include <string>
#include <vector>
#include <iostream>
#include <map>
#include "plink.h"
class Plink;
class HaploPhase;
using namespace std;
class ChapModel {
public:
string model;
map<int,int> haploGroup;
vector<bool> masked_conditioning_snps;
vector_t coef;
vector_t se;
vector_t p;
vector<string> label;
vector< set<int> > group;
double lnLk;
int df;
double rsq;
void buildFromSNPs(string);
void buildFromGroups(string);
bool haplotypesInSameGroup(int,int);
};
class Chap {
public:
ChapModel * alternate;
ChapModel * null;
ChapModel * current;
Plink * P;
HaploPhase * H;
Chap(Plink * p_, HaploPhase * h_)
{
P = p_;
H = h_;
}
void determineTestType();
void setModels(ChapModel &, ChapModel &);
void build(ChapModel &);
void setSNPList(vector<int> &, ChapModel &);
bool isNested();
};
#endif
|