| 288 | } |
| 289 | |
| 290 | ExitCodes main_(int, const char**) override |
| 291 | { |
| 292 | ExitCodes return_code = TOPPMapAlignerBase::checkParameters_(); |
| 293 | if (return_code != EXECUTION_OK) return return_code; |
| 294 | |
| 295 | // set up alignment algorithm: |
| 296 | MapAlignmentAlgorithmIdentification algorithm; |
| 297 | Param algo_params = getParam_().copy("algorithm:", true); |
| 298 | algorithm.setParameters(algo_params); |
| 299 | algorithm.setLogType(log_type_); |
| 300 | |
| 301 | Int reference_index = getReference_(algorithm); |
| 302 | |
| 303 | // handle in- and output files: |
| 304 | StringList input_files = getStringList_("in"); |
| 305 | if (input_files.size() == 1) |
| 306 | { |
| 307 | OPENMS_LOG_WARN << "Only one file provided as input to MapAlignerIdentification." << std::endl; |
| 308 | } |
| 309 | |
| 310 | StringList output_files = getStringList_("out"); |
| 311 | StringList trafo_files = getStringList_("trafo_out"); |
| 312 | FileTypes::Type in_type = FileHandler::getType(input_files[0]); |
| 313 | |
| 314 | vector<TransformationDescription> transformations; |
| 315 | |
| 316 | switch (in_type) |
| 317 | { |
| 318 | //------------------------------------------------------------- |
| 319 | // perform feature alignment |
| 320 | //------------------------------------------------------------- |
| 321 | case FileTypes::FEATUREXML: |
| 322 | { |
| 323 | vector<FeatureMap> feature_maps(input_files.size()); |
| 324 | FeatureXMLFile fxml_file; |
| 325 | if (output_files.empty()) |
| 326 | { |
| 327 | // store only transformation descriptions, not transformed data => |
| 328 | // we can load only minimum required information: |
| 329 | fxml_file.getOptions().setLoadConvexHull(false); |
| 330 | fxml_file.getOptions().setLoadSubordinates(false); |
| 331 | } |
| 332 | loadInitialMaps_(feature_maps, input_files, fxml_file); |
| 333 | |
| 334 | //------------------------------------------------------------- |
| 335 | // extract (optional) fraction identifiers and associate with featureXMLs |
| 336 | //------------------------------------------------------------- |
| 337 | String design_file = getStringOption_("design"); |
| 338 | |
| 339 | // determine map of fractions to runs |
| 340 | map<unsigned, vector<String>> frac2files; |
| 341 | |
| 342 | // TODO: check if can be put in common helper function |
| 343 | if (!design_file.empty()) |
| 344 | { |
| 345 | // parse design file and determine fractions |
| 346 | ExperimentalDesign ed = ExperimentalDesignFile::load(design_file, |
| 347 | false); |
nothing calls this directly
no test coverage detected