#ifndef __GENOTYPETRIO_H_ #define __GENOTYPETRIO_H_ #include #include #include #include #include "genotype.h" #include "function.h" using namespace std; class inheritance { public: pair hp_par1; pair hp_par2; pair hp_offspring; }; class Genotypetrio // record all possible haplotype that is compatible with the observed genotype { private: int count; int size; // number of SNPs in the genotype/haplotype vector inh_vec; // record trio haplotype pairs vector inh_vec_complete; // also expand the untyped parent vector hap_num; // store Z-\mu, demension a public: int typed_o; int typed_par1; int typed_par2; int info; // if inh_vec.size()=0, info=0, otherwise info=1 Genotype * offspring; Genotype * par1; Genotype * par2; int phase; /* Constructor */ Genotypetrio(Genotype * offspring, Genotype * par1, Genotype * par2, int typed_o, int typed_par1, int typed_par2, int size); Genotypetrio(Genotype * offspring, int typed_o, int typed_par1, int typed_par2, int size); const vector & get_inh_vec() { return inh_vec; } const vector & get_inh_vec_complete() { return inh_vec_complete; } int get_size() { return size; } int get_num() { return count; } void increase_num() { count++; } void record_trio_hap_structure(); // fill in inh_vec and inh_vec_complete // function for IQL_b void expected_hap_num(map & hap_freq_table, double *freq, map, double> & geno_freq_table, map, int> & hap_pair_map, int **count, const vector & sites); const vector & get_hap_num() { return hap_num; } void display(const pair & hap); void show_content(); // print inh_vec void show_gstat(); // print trio genotype with its count void push_vec(const vector > & hap_vec, int f0, int f1, int m0, int m1, int a, int b); void push_vec_complete(const vector > & hap_vec, int f0, int f1, int m0, int m1, int a, int b); void determin_phase(); ~Genotypetrio(); // delete private: void push_vec(int f0, int f1, int m0, int m1, int a, int b); void push_vec_complete(int f0, int f1, int m0, int m1, int a, int b); }; int is_in(const vector > & hap_vec, int o1, int o2); #endif