| 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 | } |
nothing calls this directly
no test coverage detected