libStatGen Software
1
|
00001 /* 00002 * Copyright (C) 2010 Regents of the University of Michigan 00003 * 00004 * This program is free software: you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation, either version 3 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00016 */ 00017 00018 #ifndef __PEDFAMILY_H__ 00019 #define __PEDFAMILY_H__ 00020 00021 #include "PedigreeAlleles.h" 00022 #include "PedigreePerson.h" 00023 #include "StringBasics.h" 00024 00025 class Pedigree; 00026 00027 class Family 00028 { 00029 public: 00030 Pedigree & ped; 00031 String famid; 00032 int serial; 00033 int first, last; // sentinel family members 00034 int count; // number of individuals in pedigree 00035 int founders; // number of founders in pedigree 00036 int nonFounders; // number of non-founders in pedigree 00037 int mzTwins; // number of MZ twins, excluding 1st twin in set 00038 int * path; // traverses the pedigree so that ancestors 00039 // preceed their descendants 00040 00041 int generations; // Rough classification as: 00042 // 1 -- all individuals are unrelated 00043 // 2 -- two generations (inc. multiple couples) 00044 // 3 -- three or more generations 00045 00046 bool isNuclear() 00047 { 00048 return (generations == 2) && (founders == 2); 00049 } 00050 00051 Family(Pedigree & ped, int top, int bottom, int serial = 0); 00052 ~Family(); 00053 00054 int ConnectedGroups(IntArray * groupMembership = NULL); 00055 00056 private: 00057 void ShowInvalidCycles(); 00058 00059 Family & operator = (Family & rhs); 00060 // void Mark(int who, int group, IntArray * stack, IntArray & group_id ); 00061 }; 00062 00063 #endif 00064