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

Method common_main_

src/topp/FeatureLinkerBase.cpp:66–351  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64 }
65
66 ExitCodes common_main_(FeatureGroupingAlgorithm * algorithm,
67 bool labeled = false)
68 {
69 //-------------------------------------------------------------
70 // parameter handling
71 //-------------------------------------------------------------
72 StringList ins;
73 if (labeled)
74 {
75 ins.push_back(getStringOption_("in"));
76 }
77 else
78 {
79 ins = getStringList_("in");
80 }
81 String out = getStringOption_("out");
82
83 //-------------------------------------------------------------
84 // check for valid input
85 //-------------------------------------------------------------
86 // check if all input files have the correct type
87 FileTypes::Type file_type = FileHandler::getType(ins[0]);
88 for (Size i = 0; i < ins.size(); ++i)
89 {
90 if (FileHandler::getType(ins[i]) != file_type)
91 {
92 writeLogError_("Error: All input files must be of the same type!");
93 return ILLEGAL_PARAMETERS;
94 }
95 }
96
97 //-------------------------------------------------------------
98 // set up algorithm
99 //-------------------------------------------------------------
100 Param algorithm_param = getParam_().copy("algorithm:", true);
101 writeDebug_("Used algorithm parameters", algorithm_param, 3);
102 algorithm->setParameters(algorithm_param);
103
104 //-------------------------------------------------------------
105 // perform grouping
106 //-------------------------------------------------------------
107 // load input
108 ConsensusMap out_map;
109 StringList ms_run_locations;
110
111 String design_file;
112
113 // TODO: support design in labeled feature linker
114 if (!labeled)
115 {
116 design_file = getStringOption_("design");
117 }
118
119 if (file_type == FileTypes::CONSENSUSXML && !design_file.empty())
120 {
121 writeLogError_("Error: Using fractionated design with consensusXML als input is not supported!");
122 return ILLEGAL_PARAMETERS;
123 }

Callers

nothing calls this directly

Calls 15

getTypeFunction · 0.85
addDataProcessing_Function · 0.85
setParametersMethod · 0.80
getNumberOfFractionsMethod · 0.80
emplace_backMethod · 0.80
setLoadSubordinatesMethod · 0.80
setLoadConvexHullMethod · 0.80
frontMethod · 0.80
getUniqueIdMethod · 0.80
metaValueExistsMethod · 0.80

Tested by

no test coverage detected