MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / outputTo

Method outputTo

src/topp/MapStatistics.cpp:169–479  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167 }
168
169 ExitCodes outputTo(ostream& os)
170 {
171 //-------------------------------------------------------------
172 // Parameter handling
173 //-------------------------------------------------------------
174
175 // File names
176 String in = getStringOption_("in");
177
178 // File type
179 FileHandler fh;
180 FileTypes::Type in_type = FileTypes::nameToType(getStringOption_("in_type"));
181
182 if (in_type == FileTypes::UNKNOWN)
183 {
184 in_type = fh.getType(in);
185 writeDebug_(String("Input file type: ") + FileTypes::typeToName(in_type), 2);
186 }
187
188 if (in_type == FileTypes::UNKNOWN)
189 {
190 writeLogError_("Error: Could not determine input file type!");
191 return PARSE_ERROR;
192 }
193
194 PeakMap exp;
195 FeatureMap feat;
196 ConsensusMap cons;
197
198 if (in_type == FileTypes::FEATUREXML) //features
199 {
200 FeatureXMLFile().load(in, feat);
201 feat.updateRanges();
202 }
203 else if (in_type == FileTypes::CONSENSUSXML) //consensus features
204 {
205 ConsensusXMLFile().load(in, cons);
206 cons.updateRanges();
207 }
208
209 //-------------------------------------------------------------
210 // meta information
211 //-------------------------------------------------------------
212 if (getFlag_("m"))
213 {
214 os << endl
215 << "-- General information --" << endl
216 << endl
217 << "file name: " << in << endl
218 << "file type: " << FileTypes::typeToName(in_type) << endl;
219
220 //basic info
221 os << endl
222 << "-- Meta information --" << endl
223 << endl;
224
225 if (in_type == FileTypes::FEATUREXML) //features
226 {

Callers

nothing calls this directly

Calls 15

numberFunction · 0.85
writtenDigitsFunction · 0.85
getDateMethod · 0.80
getMinRTMethod · 0.80
getMaxRTMethod · 0.80
getMinMZMethod · 0.80
getMaxMZMethod · 0.80
getMinIntensityMethod · 0.80
backMethod · 0.80
precisionMethod · 0.80
StringClass · 0.50
getTypeMethod · 0.45

Tested by

no test coverage detected