| 86 | } |
| 87 | |
| 88 | ExitCodes main_(int, const char**) override |
| 89 | { |
| 90 | /////////////////////////////////// |
| 91 | // Prepare Parameters |
| 92 | /////////////////////////////////// |
| 93 | String file_in = getStringOption_("in"); |
| 94 | |
| 95 | // make sure tmp is a directory with proper separator at the end (downstream methods simply do path + filename) |
| 96 | // (do not use QDir::separator(), since its platform specific (/ or \) while absolutePath() will always use '/') |
| 97 | String tmp_dir = String(QDir(getStringOption_("outputDirectory").c_str()).absolutePath()).ensureLastChar('/'); |
| 98 | |
| 99 | QFileInfo fi(file_in.toQString()); |
| 100 | String tmp = tmp_dir + String(fi.baseName()); |
| 101 | |
| 102 | String out_qc = getStringOption_("out_qc"); |
| 103 | |
| 104 | /////////////////////////////////// |
| 105 | // Load the SWATH files |
| 106 | /////////////////////////////////// |
| 107 | boost::shared_ptr<ExperimentalSettings> exp_meta(new ExperimentalSettings); |
| 108 | std::vector<OpenSwath::SwathMap> swath_maps; |
| 109 | |
| 110 | // collect some QC data |
| 111 | if (out_qc.empty()) |
| 112 | { |
| 113 | loadSwathFiles(file_in, tmp, "split", exp_meta, swath_maps); |
| 114 | } |
| 115 | else |
| 116 | { |
| 117 | OpenSwath::SwathQC qc(30, 0.04); |
| 118 | MSDataTransformingConsumer qc_consumer; // apply some transformation |
| 119 | qc_consumer.setSpectraProcessingFunc(qc.getSpectraProcessingFunc()); |
| 120 | qc_consumer.setExperimentalSettingsFunc(qc.getExpSettingsFunc()); |
| 121 | loadSwathFiles(file_in, tmp, "split", exp_meta, swath_maps, &qc_consumer); |
| 122 | qc.storeJSON(out_qc); |
| 123 | } |
| 124 | |
| 125 | return EXECUTION_OK; |
| 126 | } |
| 127 | }; |
| 128 | |
| 129 | int main(int argc, const char** argv) |
nothing calls this directly
no test coverage detected