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

Method main_

src/topp/SiriusAdapter.cpp:140–295  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138 }
139
140 ExitCodes main_(int, const char **) override
141 {
142 //-------------------------------------------------------------
143 // Parsing parameters
144 //-------------------------------------------------------------
145 String sirius_executable = getStringOption_("sirius_executable");
146 String in = getStringOption_("in");
147 String out_sirius = getStringOption_("out_sirius");
148 String out_csifingerid = getStringOption_("out_fingerid");
149 String featureinfo = getStringOption_("in_featureinfo");
150 String out_ms = getStringOption_("out_ms");
151 String out_ann_spectra = getStringOption_("out_annotated_spectra");
152 String sirius_workspace_directory = getStringOption_("out_project_space");
153 String sirius_user_email = getStringOption_("sirius_user_email");
154 String sirius_user_password = getStringOption_("sirius_user_password");
155 bool converter_mode = getFlag_("converter_mode");
156
157 auto params = getParam_();
158 if (debug_level_ > 3)
159 {
160 params.setValue("read_sirius_stdout", "true");
161 }
162 params.setValue("project:processors", params.getValue("threads"));
163 algorithm.updateExistingParameter(params);
164
165 writeDebug_("Parameters passed to SiriusAdapterAlgorithm", algorithm.getParameters(), 3);
166
167 //-------------------------------------------------------------
168 // Calculations
169 //-------------------------------------------------------------
170 MSExperiment spectra;
171 MzMLFile f;
172 f.setLogType(log_type_);
173 f.load(in, spectra);
174
175 // make temporary files
176 SiriusAdapterAlgorithm::SiriusTemporaryFileSystemObjects sirius_tmp(debug_level_);
177
178 // run masstrace filter and feature mapping
179 FeatureMapping::FeatureMappingInfo fm_info;
180 FeatureMapping::FeatureToMs2Indices feature_mapping; // reference to *basefeature in Feature Maps stored in fm_info using a KDTree
181 algorithm.preprocessingSirius(featureinfo,
182 spectra,
183 fm_info,
184 feature_mapping);
185
186 // returns Log of feature and/or spectra number
187 algorithm.logFeatureSpectraNumber(featureinfo, feature_mapping, spectra);
188
189 // write msfile and store the compound information in CompoundInfo Object
190 vector<SiriusMSFile::CompoundInfo> v_cmpinfo;
191 SiriusMSFile::store(spectra,
192 sirius_tmp.getTmpMsFile(),
193 feature_mapping,
194 algorithm.isFeatureOnly(),
195 algorithm.getIsotopePatternIterations(),
196 algorithm.isNoMasstraceInfoIsotopePattern(),
197 v_cmpinfo);

Callers

nothing calls this directly

Calls 15

MzMLFileClass · 0.85
setLogTypeMethod · 0.80
preprocessingSiriusMethod · 0.80
logInSiriusAccountMethod · 0.80
callSiriusQProcessMethod · 0.80
absolutePathMethod · 0.80
storeFunction · 0.50
StringClass · 0.50
setValueMethod · 0.45
getValueMethod · 0.45

Tested by

no test coverage detected