#ifndef __FAMILY_H_ #define __FAMILY_H_ #include #include #include #include #include #include #include #include #include #include #include #include "matrix.h" #include "genotype.h" using namespace std; class Family{ public: int fam_id; vector fam_member; // dimension is N * 5 int N; int Affected; int UnAffected; int Unknown; int N_typed; map, double> kinship_coeff; map, double> IBD2_coeff; map, double> IBD1_coeff; map, double> IBD0_coeff; int *typed; double *weight; // complete-data weight double *test_weight; // dimension is N double *test_trio_weight1; double *test_trio_weight2; double *test_trio_weight3; map member_map; // key: ind_id value: order starting from 0 int **gcode; // genotype data of family member, dimension is N*nmark int nmark; int *cat; int *mis_cat; int *trio_cat; int *mis_trio_cat; int *mis_par_order; // 0-same order; 1-reverse order Family(vector & fam_member, int fam_id); void set(); void set_gcode(int *input_code, int loc); void set_gcode(int nmark); void fill_typed(); void fill_info_gcode(vector & geno_list); void print(); void set_cat(int m, int loc){ cat[loc] = m; } void set_mis_cat(int m, int loc){ mis_cat[loc] = m; } void set_trio_cat(int m, int loc){ trio_cat[loc] = m; } void set_mis_trio_cat(int m, int loc){ mis_trio_cat[loc] = m; } void set_mis_par_order(int m, int loc){ mis_par_order[loc] = m; } void compute_weight(); void compute_test_weight(double mean); void compute_test_trio_weight(double mean); void delete_gcode(); ~Family(); }; #endif