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

Method outputTo_

src/topp/FileInfo.cpp:210–1710  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208 }
209
210 ExitCodes outputTo_(ostream &os, ostream &os_tsv)
211 {
212 //-------------------------------------------------------------
213 // Parameter handling
214 //-------------------------------------------------------------
215
216 // File names
217 String in = getStringOption_("in");
218
219 // File type
220 FileHandler fh;
221 FileTypes::Type in_type = FileTypes::nameToType(getStringOption_("in_type"));
222
223 if (in_type == FileTypes::UNKNOWN)
224 {
225 in_type = FileHandler::getType(in);
226 writeDebug_(String("Input file type: ") + FileTypes::typeToName(in_type), 2);
227 }
228
229 if (in_type == FileTypes::UNKNOWN)
230 {
231 writeLogError_("Error: Could not determine input file type!");
232 return PARSE_ERROR;
233 }
234
235 os << '\n'
236 << "-- General information --"
237 << '\n'
238 << '\n'
239 << "File name: " << in << '\n'
240 << "File type: " << FileTypes::typeToName(in_type) << '\n';
241
242 os_tsv << "general: file name"
243 << '\t' << in << '\n'
244 << "general: file type"
245 << '\t' << FileTypes::typeToName(in_type) << '\n';
246
247 PeakMap exp;
248 FeatureMap feat;
249 ConsensusMap cons;
250 IdData id_data;
251
252 //-------------------------------------------------------------
253 // Validation
254 //-------------------------------------------------------------
255 if (getFlag_("v"))
256 {
257 bool valid = true;
258 os << '\n'
259 << "Validating " << FileTypes::typeToName(in_type) << " file";
260 switch (in_type)
261 {
262 case FileTypes::MZDATA:
263 os << " against XML schema version " << MzDataFile().getVersion() << '\n';
264 valid = MzDataFile().isValid(in, os);
265 break;
266
267 case FileTypes::MZML:

Callers

nothing calls this directly

Calls 15

getTypeFunction · 0.85
MzMLFileClass · 0.85
printChargeDistributionFunction · 0.85
stringClass · 0.85
roundFunction · 0.85
concatenateFunction · 0.85
sortFunction · 0.85
writtenDigitsFunction · 0.85
getParsingSuccessMethod · 0.80
setLogTypeMethod · 0.80
deltaMethod · 0.80
headerMatchesMethod · 0.80

Tested by

no test coverage detected