OpenMS
Loading...
Searching...
No Matches
PeptDeepRTInference Class Reference

Predicts peptide retention times with the PeptDeep RT model (peptdeep_rt_dynamic.onnx) More...

#include <OpenMS/ML/PEPTDEEP/PeptDeepRTInference.h>

Public Member Functions

 PeptDeepRTInference (const std::string &model_path, int intra_op_threads=4, size_t batch_size=500)
 Constructor initializes the ONNX environment and loads the model.
 
 ~PeptDeepRTInference ()
 Destructor.
 
std::vector< float > predictRT (const std::vector< std::string > &peptides)
 Predicts Retention Times for a list of peptide sequences.
 

Private Attributes

ONNXPredictorBase model_
 
size_t batch_size_
 

Detailed Description

Predicts peptide retention times with the PeptDeep RT model (peptdeep_rt_dynamic.onnx)

Runs the model through ONNXPredictorBase and returns one predicted retention time per peptide sequence, processing at most batch_size peptides per model run. Available in builds with WITH_ONNX.

Constructor & Destructor Documentation

◆ PeptDeepRTInference()

PeptDeepRTInference ( const std::string &  model_path,
int  intra_op_threads = 4,
size_t  batch_size = 500 
)
explicit

Constructor initializes the ONNX environment and loads the model.

Parameters
model_pathAbsolute path to peptdeep_rt_dynamic.onnx
intra_op_threadsNumber of ONNX execution threads (default 4).
batch_sizeMaximum number of peptides to process in a single ONNX run (default 500).

◆ ~PeptDeepRTInference()

Destructor.

Member Function Documentation

◆ predictRT()

std::vector< float > predictRT ( const std::vector< std::string > &  peptides)

Predicts Retention Times for a list of peptide sequences.

Parameters
peptidesA vector of peptide strings. Supports OpenMS AASequence modification notation (e.g., "PEPTIDEK", "M(Oxidation)PEP").
Returns
A vector of predicted RT values corresponding to the input peptides.
Exceptions
Exception::IllegalArgumentif peptides is empty, size constraints fail, or a sequence is chemically invalid.

Member Data Documentation

◆ batch_size_

size_t batch_size_
private

◆ model_

ONNXPredictorBase model_
private