![]() |
OpenMS
|
Classes | |
| struct | PeptDeepInputBatch |
| Flat tensor buffers and dimensions for a PeptDeep ONNX batch. More... | |
| class | PeptDeepInputBuilder |
| Shared featurization for PeptDeep RT, CCS, and MS2 ONNX predictors. More... | |
| struct | PeptDeepInputConfig |
| Sequence-padding policy for PeptDeep ONNX inputs. More... | |
Functions | |
| OpenMS::Int64 | getAAIndex (char aa) |
| Maps amino acid characters to 1-based token indices for PeptDeep models. | |
| void | validatePeptide (const std::string &peptide) |
| Validates a peptide sequence for PeptDeep inference. Throws explicit OpenMS exceptions if the sequence is invalid, too long, or contains modifications. | |
| std::vector< float > | generateUnmodifiedModXTensor (size_t batch_size, size_t sequence_length) |
| Generates an empty mod_x tensor for unmodified peptides. Resolves to a flat vector of zeros of size (batch_size * sequence_length * 109). | |
Variables | |
| constexpr int64_t | PEPTDEEP_MOD_ELEMENTS = 109 |
| const std::string | PEPTDEEP_VALID_AAS = "ACDEFGHIKLMNPQRSTVWY" |
| struct OpenMS::ML::PeptDeepInputBatch |
Flat tensor buffers and dimensions for a PeptDeep ONNX batch.
| Class Members | ||
|---|---|---|
| vector< int64_t > | aa_indices | |
| size_t | batch_size = 0 | |
| vector< float > | charges | |
| vector< int64_t > | instrument_indices | |
| vector< float > | mod_x | |
| vector< float > | nces | |
| size_t | sequence_length = 0 | |
| struct OpenMS::ML::PeptDeepInputConfig |
Sequence-padding policy for PeptDeep ONNX inputs.
|
inline |
Generates an empty mod_x tensor for unmodified peptides. Resolves to a flat vector of zeros of size (batch_size * sequence_length * 109).
References PEPTDEEP_MOD_ELEMENTS.
|
inline |
Maps amino acid characters to 1-based token indices for PeptDeep models.
Converts uppercase and lowercase letters A-Z to indices 1-26 using canonical ord-offset encoding. Non-alphabetic characters map to 0, which serves as the padding and unknown token in PeptDeep ONNX input tensors.
| aa | Amino acid character (case-insensitive) |
|
inline |
Validates a peptide sequence for PeptDeep inference. Throws explicit OpenMS exceptions if the sequence is invalid, too long, or contains modifications.
| peptide | The raw peptide string to validate. |
References PEPTDEEP_VALID_AAS.
|
constexpr |
Referenced by generateUnmodifiedModXTensor().
| const std::string PEPTDEEP_VALID_AAS = "ACDEFGHIKLMNPQRSTVWY" |
Referenced by validatePeptide().