00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef _FORMAT_H
00022 #define _FORMAT_H
00023
00024 #include <set>
00025 #include <vector>
00026
00027 #include "global.h"
00028
00029
00030 struct MyAffyFileFormat
00031 {
00032
00033 char delimiter;
00034
00035 bool hasCallInfo;
00036
00037
00038 int numGeneNames;
00039
00040
00041 int geneIdColumn;
00042 int geneNameColumn;
00043 string geneIdColumnName;
00044 string geneNameColumnName;
00045
00046
00047
00048
00049 int rowNameColumn;
00050 string rowNameColumnName;
00051
00052 string callColumnName;
00053 vector< int > valueColumns;
00054
00055
00056 map< string, bool > ignoredColumns;
00057
00058
00059
00060 set< unsigned int > ignoredColumnIndices;
00061 map< string, bool > ignoredRows;
00062
00063
00064 void print(ostream& ostr) const;
00065
00066
00067
00068 MyAffyFileFormat()
00069 : delimiter('\t'), hasCallInfo(false), numGeneNames(-1),
00070
00071 geneIdColumn(0), geneNameColumn(1), geneIdColumnName(""),
00072 geneNameColumnName(""), rowNameColumn(-1), rowNameColumnName(""),
00073 callColumnName(""), valueColumns(),
00074 ignoredColumns(), ignoredColumnIndices(), ignoredRows()
00075 {}
00076
00077 };
00078
00079
00080
00081 inline void MyAffyFileFormat::print(ostream& ostr) const
00082 {
00083 ostr << "File format variables:\n";
00084 ostr << "\tdelimiter = \"" << delimiter << "\"\n";
00085 if ("" != geneIdColumnName)
00086 {
00087 ostr << "\tgene id column = " << geneIdColumn << endl;
00088 ostr << "\tname of gene id column = " << geneIdColumnName << endl;
00089 }
00090 if ("" != geneNameColumnName)
00091 {
00092 ostr << "\tgene name column = " << geneNameColumn << endl;
00093 ostr << "\tname of gene name column = " << geneNameColumnName << endl;
00094 }
00095 if ("" != rowNameColumnName)
00096 {
00097 ostr << "\trow name column = " << rowNameColumn << endl;
00098 ostr << "\tname of row name column = " << rowNameColumnName << endl;
00099 }
00100
00101
00102 ostr << "\thas call info = " << hasCallInfo << endl;
00103 ostr << "\tname of call column = " << callColumnName << endl;
00104
00105 }
00106
00107
00108
00109
00110 #endif // _FORMAT_H