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

Method run

src/openms/source/ANALYSIS/XLMS/OpenPepXLAlgorithm.cpp:157–1088  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155 }
156
157 OpenPepXLAlgorithm::ExitCodes OpenPepXLAlgorithm::run(PeakMap& unprocessed_spectra, ConsensusMap& cfeatures, std::vector<FASTAFile::FASTAEntry>& fasta_db, std::vector<ProteinIdentification>& protein_ids, std::vector<PeptideIdentification>& peptide_ids, OPXLDataStructs::PreprocessedPairSpectra& preprocessed_pair_spectra, std::vector< std::pair<Size, Size> >& spectrum_pairs, std::vector< std::vector< OPXLDataStructs::CrossLinkSpectrumMatch > >& all_top_csms, PeakMap& spectra)
158 {
159 ProgressLogger progresslogger;
160 progresslogger.setLogType(this->getLogType());
161
162 // preprocess parameters for convenience
163 if (fragment_mass_tolerance_xlinks_ < fragment_mass_tolerance_)
164 {
165 fragment_mass_tolerance_xlinks_ = fragment_mass_tolerance_;
166 }
167#ifdef DEBUG_OPENPEPXLALGO
168 OPENMS_LOG_DEBUG << "XLinks Tolerance: " << fragment_mass_tolerance_xlinks_ << endl;
169#endif
170
171 std::sort(cross_link_mass_mono_link_.begin(), cross_link_mass_mono_link_.end(), std::greater< double >());
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 set<String> fixed_unique(fixedModNames_.begin(), fixedModNames_.end());
180 if (fixed_unique.size() != fixedModNames_.size())
181 {
182 OPENMS_LOG_WARN << "duplicate fixed modification provided." << endl;
183 return ExitCodes::ILLEGAL_PARAMETERS;
184 }
185
186 set<String> var_unique(varModNames_.begin(), varModNames_.end());
187 if (var_unique.size() != varModNames_.size())
188 {
189 OPENMS_LOG_WARN << "duplicate variable modification provided." << endl;
190 return ExitCodes::ILLEGAL_PARAMETERS;
191 }
192 ModifiedPeptideGenerator::MapToResidueType fixed_modifications = ModifiedPeptideGenerator::getModifications(fixedModNames_);
193 ModifiedPeptideGenerator::MapToResidueType variable_modifications = ModifiedPeptideGenerator::getModifications(varModNames_);
194
195 protein_ids[0].setPrimaryMSRunPath({}, unprocessed_spectra);
196
197 if (unprocessed_spectra.empty() && unprocessed_spectra.getChromatograms().empty())
198 {
199 OPENMS_LOG_WARN << "The given file does not contain any conventional peak data, but might"
200 " contain chromatograms. This tool currently cannot handle them, sorry." << endl;
201 return INCOMPATIBLE_INPUT_DATA;
202 }
203
204 //check if spectra are sorted
205 for (Size i = 0; i < unprocessed_spectra.size(); ++i)
206 {
207 if (!unprocessed_spectra[i].isSorted())
208 {
209 OPENMS_LOG_WARN << "Error: Not all spectra are sorted according to peak m/z positions. Use FileFilter to sort the input!" << endl;
210 return INCOMPATIBLE_INPUT_DATA;
211 }
212 }
213
214 // Peak Picking, check if all levels are picked and pick uncentroided MS levels

Callers

nothing calls this directly

Calls 15

sortFunction · 0.85
getInstanceFunction · 0.85
CLSMScoreComparatorClass · 0.85
getDataArrayByNameFunction · 0.85
setLogTypeMethod · 0.80
getLogTypeMethod · 0.80
getChromatogramsMethod · 0.80
sortSpectraMethod · 0.80
setParametersMethod · 0.80
getFeaturesMethod · 0.80
getMetaValueMethod · 0.80

Tested by

no test coverage detected