comparison seg2matrix/CGData/CsegToMatrix.cc @ 54:59dbe857f5d4

introduce normal_CNV parameter
author jingchunzhu
date Thu, 17 Sep 2015 22:03:04 -0700
parents ab20c0d04f4a
children
comparison
equal deleted inserted replaced
53:7de3db823f90 54:59dbe857f5d4
75 } 75 }
76 } 76 }
77 77
78 78
79 79
80 void print_matrix(segmap *data, set<string> *targetSet, void (*print)(const char *)) { 80 void print_matrix(segmap *data, set<string> *targetSet, void (*print)(const char *), char* NORMAL_CNV) {
81 81
82 //create a break map 82 //create a break map
83 breakmap breaks; 83 breakmap breaks;
84 for( segmap::iterator t = data->begin(); t!=data->end(); ++t) { 84 for( segmap::iterator t = data->begin(); t!=data->end(); ++t) {
85 for ( chromemap::iterator c = t->second.begin(); c != t->second.end(); ++c) { 85 for ( chromemap::iterator c = t->second.begin(); c != t->second.end(); ++c) {
174 print(probeName[i].c_str()); 174 print(probeName[i].c_str());
175 for ( int j = 0; j < targetCount; j++ ) { 175 for ( int j = 0; j < targetCount; j++ ) {
176 float val = gm[i][j]; 176 float val = gm[i][j];
177 print("\t"); 177 print("\t");
178 if ( val == MISSING_VAL ) 178 if ( val == MISSING_VAL )
179 print("NA"); 179 print(NORMAL_CNV);
180 else { 180 else {
181 char str[20] = ""; 181 char str[20] = "";
182 sprintf(str, "%f", val); 182 sprintf(str, "%f", val);
183 print(str); 183 print(str);
184 } 184 }