| 49 | } |
| 50 | |
| 51 | void FIAMSScheduler::run() { |
| 52 | #pragma omp parallel for |
| 53 | for (int i = 0; i < (int)samples_.size(); ++i) { |
| 54 | MSExperiment exp; |
| 55 | MzMLFile mzml; |
| 56 | mzml.load(base_dir_ + samples_[i].at("dir_input") + "/" + samples_[i].at("filename") + ".mzML", exp); |
| 57 | |
| 58 | FIAMSDataProcessor fia_processor; |
| 59 | Param p; |
| 60 | p.setValue("filename", samples_[i].at("filename")); |
| 61 | p.setValue("dir_output", base_dir_ + samples_[i].at("dir_output")); |
| 62 | p.setValue("resolution", std::stof(samples_[i].at("resolution"))); |
| 63 | p.setValue("polarity", samples_[i].at("charge")); |
| 64 | p.setValue("db:mapping", std::vector<std::string>{base_dir_ + samples_[i].at("db_mapping")}); |
| 65 | p.setValue("db:struct", std::vector<std::string>{base_dir_ + samples_[i].at("db_struct")}); |
| 66 | p.setValue("positive_adducts", base_dir_ + samples_[i].at("positive_adducts")); |
| 67 | p.setValue("negative_adducts", base_dir_ + samples_[i].at("negative_adducts")); |
| 68 | fia_processor.setParameters(p); |
| 69 | |
| 70 | String time = samples_[i].at("time"); |
| 71 | std::vector<String> times; |
| 72 | time.split(";", times); |
| 73 | for (Size j = 0; j < times.size(); ++j) { |
| 74 | OPENMS_LOG_INFO << "Started " << samples_[i].at("filename") << " for " << times[j] << " seconds" << std::endl; |
| 75 | MzTab mztab_output; |
| 76 | fia_processor.run(exp, std::stof(times[j]), mztab_output, load_cached_); |
| 77 | OPENMS_LOG_INFO << "Finished " << samples_[i].at("filename") << " for " << times[j] << " seconds" << std::endl; |
| 78 | } |
| 79 | } |
| 80 | } |
| 81 | |
| 82 | const std::vector<std::map<String, String>>& FIAMSScheduler::getSamples() { |
| 83 | return samples_; |