11#include <OpenMS/config.h>
23 class PeptideIdentificationList;
24 class ProteinIdentification;
25 class PeptDeepMS2Inference;
26 class PeptDeepRTInference;
89 static constexpr const char* NCE_META_VALUE =
"peptdeep_nce";
130 std::vector<ProteinIdentification>& protein_ids,
151 std::vector<ProteinIdentification>& protein_ids,
157 std::vector<ProteinIdentification>& protein_ids,
207 std::vector<ProteinIdentification>& protein_ids,
221 std::vector<Size>
confidentRows_(
const std::vector<Row>& rows,
const std::vector<Size>& run_rows,
bool higher_better)
const;
225 double selectRunNCE_(
const std::map<std::string, double>& collision_energies,
228 const std::vector<Size>& run_rows,
229 const std::vector<Size>& confident,
232 double& median_cosine);
236 static void storeNCE_(std::vector<ProteinIdentification>& protein_ids,
const std::map<std::string, double>& nce_by_run);
242 const std::map<std::string, double>& collision_energies,
245 const std::vector<Size>& run_rows,
253 double nce_grid_halfwidth_{6.0};
254 double nce_grid_step_{2.0};
255 double nce_fallback_{30.0};
258 double calibration_quantile_{0.5};
259 std::string rt_model_type_{
"b_spline"};
261 int ms2_min_ordinal_{1};
262 double ms2_strong_fraction_{0.05};
266 double used_nce_{-1.0};
267 double rt_calibration_error_{-1.0};
A base class for all classes handling default parameters.
Definition DefaultParamHandler.h:66
In-Memory representation of a mass spectrometry run.
Definition MSExperiment.h:49
Inference engine for PeptDeep MS2 Fragment Intensity prediction.
Definition PeptDeepMS2Inference.h:23
Predicts peptide retention times with the PeptDeep RT model (peptdeep_rt_dynamic.onnx)
Definition PeptDeepRTInference.h:26
Annotates PSMs with rescoring features derived from PeptDeep predictions.
Definition PeptDeepRescoring.h:75
bool calibration_candidate
best hit of its spectrum and not a decoy
Definition PeptDeepRescoring.h:188
void annotate(const PeakMap &spectra, std::vector< ProteinIdentification > &protein_ids, PeptideIdentificationList &peptide_ids)
Annotates peptide_ids in place and registers the features for rescoring.
std::map< std::string, std::vector< Size > > rows_by_run
Definition PeptDeepRescoring.h:198
Size getNumPredictedPSMs() const
double getRTCalibrationError() const
static PSMRows gatherPSMs_(const PeptideIdentificationList &peptide_ids)
bool startCall_(const PeptideIdentificationList &peptide_ids, const StringList &models, const std::string &what)
Size key
index into the de-duplicated (sequence, charge) list
Definition PeptDeepRescoring.h:186
std::vector< std::string > uniq_seq
Definition PeptDeepRescoring.h:196
Size pi
index into the PeptideIdentificationList
Definition PeptDeepRescoring.h:183
double score
search score, used to pick the calibration set
Definition PeptDeepRescoring.h:187
~PeptDeepRescoring() override
Destructor.
PeptDeepRescoring()
Constructor. Sets the default parameters; the model paths start empty and must be set.
double getUsedNCE() const
std::string ms2_model_
Definition PeptDeepRescoring.h:250
Size len
peptide length
Definition PeptDeepRescoring.h:185
static StringList featureNames()
Names of the features this class adds to each PSM, in a stable order.
Size getNumPSMs() const
Number of PSMs (peptide hits) seen by the last annotate() call.
std::vector< Size > confidentRows_(const std::vector< Row > &rows, const std::vector< Size > &run_rows, bool higher_better) const
void selectNCE(const PeakMap &spectra, std::vector< ProteinIdentification > &protein_ids, const PeptideIdentificationList &peptide_ids, PeptDeepMS2Inference &ms2_inference)
std::string instrument_
Definition PeptDeepRescoring.h:257
std::string rt_model_
Definition PeptDeepRescoring.h:251
Size hit
index into that identification's hits
Definition PeptDeepRescoring.h:184
static std::map< std::string, double > collisionEnergies_(const PeakMap &spectra)
std::vector< float > uniq_charge
Definition PeptDeepRescoring.h:197
void updateMembers_() override
This method is used to update extra member variables at the end of the setParameters() method.
void annotateRun_(const std::string &run_id, const std::map< std::string, double > &collision_energies, PeptideIdentificationList &peptide_ids, const PSMRows &psms, const std::vector< Size > &run_rows, bool higher_better, PeptDeepMS2Inference &ms2_inference, PeptDeepRTInference &rt_inference)
static void storeNCE_(std::vector< ProteinIdentification > &protein_ids, const std::map< std::string, double > &nce_by_run)
std::vector< Row > rows
Definition PeptDeepRescoring.h:195
void selectNCE(const PeakMap &spectra, std::vector< ProteinIdentification > &protein_ids, const PeptideIdentificationList &peptide_ids)
Selects the normalised collision energy of each run of peptide_ids as annotate() does,...
double selectRunNCE_(const std::map< std::string, double > &collision_energies, const PeptideIdentificationList &peptide_ids, const PSMRows &psms, const std::vector< Size > &run_rows, const std::vector< Size > &confident, PeptDeepMS2Inference &ms2_inference, double ¢re, double &median_cosine)
void selectNCE_(const PeakMap &spectra, std::vector< ProteinIdentification > &protein_ids, const PeptideIdentificationList &peptide_ids, PeptDeepMS2Inference &ms2_inference)
selectNCE() with the session ms2_inference
Definition PeptDeepRescoring.h:194
Row of the flat PSM work list built by annotate().
Definition PeptDeepRescoring.h:182
Container for peptide identifications from multiple spectra.
Definition PeptideIdentificationList.h:66
Base class for all classes that want to report their progress.
Definition ProgressLogger.h:28
int Int
Signed integer type.
Definition Types.h:72
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition Types.h:97
std::vector< std::string > StringList
Vector of String.
Definition TypeAliases.h:39
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19