OpenMS
Loading...
Searching...
No Matches
PeptDeepUtils.h File Reference
#include <OpenMS/CONCEPT/Types.h>
#include <OpenMS/CONCEPT/Exception.h>
#include <string>
#include <vector>
#include <array>
#include <string_view>

Go to the source code of this file.

Namespaces

namespace  OpenMS
 Main OpenMS namespace.
 
namespace  OpenMS::ML
 

Functions

int64_t instrumentIndex (std::string_view name)
 Instrument index for name, mirroring peptdeep's parse_instrument_indices().
 
void validateInstrumentIndices (const std::vector< int64_t > &instrument_indices)
 Validates instrument indices for PeptDeep MS2 inference.
 
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. Complex character validation and modification parsing is handled downstream by AASequence.
 

Variables

constexpr int64_t PEPTDEEP_MOD_ELEMENTS = 109
 
constexpr std::array< std::string_view, 109 > ALPHAPEPTDEEP_MOD_ELEMENTS
 AlphaPeptDeep's exact 109-element array for modification tensor mapping. Elements missing from this list are binned into the final "Other" channel ("?"). Heavy isotopes (2H, 13C, 15N, 18O) map strictly to their dedicated channels.
 
constexpr int64_t PEPTDEEP_MAX_INSTRUMENT_NUM = 8
 Width of the instrument one-hot in AlphaPeptDeep's MS2 model.
 
constexpr int64_t PEPTDEEP_UNKNOWN_INSTRUMENT_INDEX = PEPTDEEP_MAX_INSTRUMENT_NUM - 1
 Index peptdeep gives an instrument it does not recognise (featurize.py: max_instrument_num - 1).
 
constexpr std::array< std::string_view, 5 > ALPHAPEPTDEEP_INSTRUMENTS
 AlphaPeptDeep's instrument names, in the order that is their encoding.