PedigreeDescription.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __PEDDESCRIBE_H__
00019 #define __PEDDESCRIBE_H__
00020
00021 #include "PedigreeGlobals.h"
00022 #include "PedigreePerson.h"
00023 #include "StringArray.h"
00024 #include "IntArray.h"
00025
00026 #include <stdio.h>
00027
00028
00029 #define pcSkip 0
00030 #define pcMarker 1
00031 #define pcTrait 2
00032 #define pcAffection 3
00033 #define pcCovariate 4
00034 #define pcZygosity 5
00035 #define pcEnd 6
00036
00037
00038 #define pcUndocumentedTraitCovariate 1001
00039
00040 class PedigreeDescription : public PedigreeGlobals
00041 {
00042 public:
00043 int columnCount;
00044 IntArray columns, columnHash;
00045
00046 PedigreeDescription();
00047 ~PedigreeDescription();
00048
00049 void Load(IFILE & Input, bool warnIfLinkage = false);
00050 void Load(const char * filename, bool warnIfLinkage = false);
00051
00052 void LoadLinkageDataFile(IFILE & input);
00053 void LoadLinkageDataFile(const char * filename);
00054
00055 void LoadMendelDataFile(IFILE & input);
00056 void LoadMendelDataFile(const char * filename);
00057
00058 void LoadMap(IFILE & Input);
00059 void LoadMap(const char * filename);
00060
00061 PedigreeDescription & operator = (PedigreeDescription & rhs);
00062
00063 int CountTextColumns();
00064
00065
00066 const char * ColumnSummary(String & string);
00067
00068
00069 bool mendelFormat;
00070
00071 String filename;
00072
00073 private:
00074 int ReadLineHelper(IFILE & input, String & buffer, StringArray & tokens);
00075
00076 int CountColumns(int type);
00077 void UpdateSummary(String & string, int type, const char * label);
00078 };
00079
00080 #endif
00081