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

Method main_

src/topp/FileFilter.cpp:493–1214  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

491 }
492
493 ExitCodes main_(int, const char**) override
494 {
495
496 //-------------------------------------------------------------
497 // parameter handling
498 //-------------------------------------------------------------
499
500 //input file name and type
501 String in = getStringOption_("in");
502 FileHandler fh;
503
504 FileTypes::Type in_type = fh.getType(in);
505 //only use flag in_type, if the in_type cannot be determined by file
506 if (in_type == FileTypes::UNKNOWN)
507 {
508 in_type = FileTypes::nameToType(getStringOption_("in_type"));
509 writeDebug_(String("Input file type: ") + FileTypes::typeToName(in_type), 2);
510 }
511
512 //output file name and type
513 String out = getStringOption_("out");
514
515 FileTypes::Type out_type = fh.getTypeByFileName(out);
516
517 //only use flag out_type, if the out_type cannot be determined by file
518 if (out_type == FileTypes::UNKNOWN)
519 {
520 out_type = FileTypes::nameToType(getStringOption_("out_type"));
521 writeDebug_(String("Output file type: ") + FileTypes::typeToName(out_type), 2);
522 }
523 //use in_type as out_type, if out_type cannot be determined by file or out_type flag
524 if (out_type == FileTypes::UNKNOWN)
525 {
526 out_type = in_type;
527 writeDebug_(String("Output file type: ") + FileTypes::typeToName(out_type), 2);
528 }
529
530 bool no_chromatograms(getFlag_("peak_options:no_chromatograms"));
531
532 //ranges
533 double mz_l, mz_u, rt_l, rt_u, it_l, it_u, charge_l, charge_u, size_l, size_u, q_l, q_u, pc_left, pc_right, select_collision_l, remove_collision_l, select_collision_u, remove_collision_u, select_isolation_width_l, remove_isolation_width_l, select_isolation_width_u, remove_isolation_width_u, replace_pc_charge_in, replace_pc_charge_out;
534
535 //initialize ranges
536 mz_l = rt_l = it_l = charge_l = size_l = q_l = pc_left = select_collision_l = remove_collision_l = select_isolation_width_l = remove_isolation_width_l = replace_pc_charge_in = -1 * numeric_limits<double>::max();
537 mz_u = rt_u = it_u = charge_u = size_u = q_u = pc_right = select_collision_u = remove_collision_u = select_isolation_width_u = remove_isolation_width_u = replace_pc_charge_out = numeric_limits<double>::max();
538
539 String rt = getStringOption_("rt");
540 String mz = getStringOption_("mz");
541 String pc_mz_range = getStringOption_("peak_options:pc_mz_range");
542 String it = getStringOption_("int");
543 IntList levels = getIntList_("peak_options:level");
544 IntList maps = getIntList_("consensus:map");
545 double sn = getDoubleOption_("peak_options:sn");
546 String charge = getStringOption_("f_and_c:charge");
547 String size = getStringOption_("f_and_c:size");
548 String q = getStringOption_("feature:q");
549 String remove_collision_energy = getStringOption_("spectra:remove_collision_energy");
550 String select_collision_energy = getStringOption_("spectra:select_collision_energy");

Callers

nothing calls this directly

Calls 15

MzMLFileClass · 0.85
addDataProcessing_Function · 0.85
getTypeByFileNameMethod · 0.80
toIntMethod · 0.80
setCompressionMethod · 0.80
setLogTypeMethod · 0.80
setMSLevelsMethod · 0.80
setMz32BitMethod · 0.80
setIntensity32BitMethod · 0.80
setWriteIndexMethod · 0.80

Tested by

no test coverage detected