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

Method run

src/openms/source/ANALYSIS/XLMS/OpenPepXLLFAlgorithm.cpp:160–969  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

158 }
159
160 OpenPepXLLFAlgorithm::ExitCodes OpenPepXLLFAlgorithm::run(PeakMap& unprocessed_spectra, std::vector<FASTAFile::FASTAEntry>& fasta_db, std::vector<ProteinIdentification>& protein_ids, std::vector<PeptideIdentification>& peptide_ids, std::vector< std::vector< OPXLDataStructs::CrossLinkSpectrumMatch > >& all_top_csms, PeakMap& spectra)
161 {
162 ProgressLogger progresslogger;
163 progresslogger.setLogType(this->getLogType());
164
165 // preprocess parameters for convenience
166 if (fragment_mass_tolerance_xlinks_ < fragment_mass_tolerance_)
167 {
168 fragment_mass_tolerance_xlinks_ = fragment_mass_tolerance_;
169 }
170 std::sort(cross_link_mass_mono_link_.begin(), cross_link_mass_mono_link_.end(), std::greater< double >());
171 set<String> fixed_unique(fixedModNames_.begin(), fixedModNames_.end());
172
173 // deisotope if "true" or if "auto" and the tolerance is below the threshold (0.1 Da or 100 ppm)
174 bool deisotope = (deisotope_mode_ == "true") ||
175 (deisotope_mode_ == "auto" &&
176 ((!fragment_mass_tolerance_unit_ppm_ && fragment_mass_tolerance_ < 0.1) ||
177 (fragment_mass_tolerance_unit_ppm_ && fragment_mass_tolerance_ < 100)));
178
179 if (fixed_unique.size() != fixedModNames_.size())
180 {
181 OPENMS_LOG_WARN << "duplicate fixed modification provided." << endl;
182 return ExitCodes::ILLEGAL_PARAMETERS;
183 }
184
185 set<String> var_unique(varModNames_.begin(), varModNames_.end());
186 if (var_unique.size() != varModNames_.size())
187 {
188 OPENMS_LOG_WARN << "duplicate variable modification provided." << endl;
189 return ExitCodes::ILLEGAL_PARAMETERS;
190 }
191 ModifiedPeptideGenerator::MapToResidueType fixed_modifications = ModifiedPeptideGenerator::getModifications(fixedModNames_);
192 ModifiedPeptideGenerator::MapToResidueType variable_modifications = ModifiedPeptideGenerator::getModifications(varModNames_);
193
194 protein_ids[0].setPrimaryMSRunPath({}, unprocessed_spectra);
195
196 if (unprocessed_spectra.empty() && unprocessed_spectra.getChromatograms().empty())
197 {
198 OPENMS_LOG_WARN << "The given file does not contain any conventional peak data, but might"
199 " contain chromatograms. This tool currently cannot handle them, sorry." << endl;
200 return INCOMPATIBLE_INPUT_DATA;
201 }
202
203 //check if spectra are sorted
204 for (Size i = 0; i < unprocessed_spectra.size(); ++i)
205 {
206 if (!unprocessed_spectra[i].isSorted())
207 {
208 OPENMS_LOG_WARN << "Error: Not all spectra are sorted according to peak m/z positions. Use FileFilter to sort the input!" << endl;
209 return INCOMPATIBLE_INPUT_DATA;
210 }
211 }
212
213 // Peak Picking, check if all levels are picked and pick uncentroided MS levels
214 PeakPickerHiRes pp;
215 PeakMap picked_spectra;
216 progresslogger.startProgress(0, 1, "Centroiding data (if necessary)...");
217 pp.pickExperiment(unprocessed_spectra, picked_spectra, true);

Callers

nothing calls this directly

Calls 15

sortFunction · 0.85
getInstanceFunction · 0.85
getPPMFunction · 0.85
CLSMScoreComparatorClass · 0.85
getDataArrayByNameFunction · 0.85
setLogTypeMethod · 0.80
getLogTypeMethod · 0.80
getChromatogramsMethod · 0.80
sortSpectraMethod · 0.80
getEnzymeMethod · 0.80
setSearchParametersMethod · 0.80

Tested by

no test coverage detected