![]() |
OpenMS
|
Inference engine for PeptDeep MS2 Fragment Intensity prediction. More...
#include <OpenMS/ML/PEPTDEEP/PeptDeepMS2Inference.h>
Public Member Functions | |
| PeptDeepMS2Inference (const std::string &model_path, int intra_op_threads=4, size_t batch_size=500) | |
| Constructor initializes the ONNX session with the specified model graph. | |
| ~PeptDeepMS2Inference () | |
| Destructor. | |
| std::vector< std::vector< float > > | predictMS2 (const std::vector< std::string > &peptides, const std::vector< float > &charges, const std::vector< float > &nces, const std::vector< int64_t > &instrument_indices) |
| Predicts MS2 fragment intensities for a batch of peptide sequences. | |
Private Attributes | |
| ONNXPredictorBase | model_ |
| size_t | batch_size_ |
Inference engine for PeptDeep MS2 Fragment Intensity prediction.
This class parses and tokenizes raw peptide string sequences into structural integer arrays and evaluates them through the ONNX Runtime backend to predict fragment intensities.
|
explicit |
Constructor initializes the ONNX session with the specified model graph.
| model_path | Absolute or relative path to the PeptDeep MS2 ONNX model file. |
| intra_op_threads | Number of ONNX execution threads (default 4). |
| batch_size | Maximum number of peptides to process in a single ONNX run (default 500). |
| Exception::BaseException | if the model file cannot be found or loaded by the runtime. |
| ~PeptDeepMS2Inference | ( | ) |
Destructor.
| std::vector< std::vector< float > > predictMS2 | ( | const std::vector< std::string > & | peptides, |
| const std::vector< float > & | charges, | ||
| const std::vector< float > & | nces, | ||
| const std::vector< int64_t > & | instrument_indices | ||
| ) |
Predicts MS2 fragment intensities for a batch of peptide sequences.
| peptides | A vector of raw uppercase peptide strings. |
| charges | A vector of precursor charge states (must match peptides size). |
| nces | A vector of normalized collision energies (must match peptides size). |
| instrument_indices | A vector of categorical integers representing MS instruments (e.g., 0=Lumos, 1=QE, 2=timsTOF, 3=Sciex). |
| std::invalid_argument | if the sequence string is empty, too long, or contains unmapped characters. |
|
private |
|
private |