33 if (aa >=
'A' && aa <=
'Z')
return aa -
'A' + 1;
34 if (aa >=
'a' && aa <=
'z')
return aa -
'a' + 1;
44 if (peptide.empty()) {
47 if (peptide.find_first_of(
"[]()") != std::string::npos) {
48 throw Exception::IllegalArgument(__FILE__, __LINE__, OPENMS_PRETTY_FUNCTION,
"Modified peptides are not currently supported in this engine.");
51 throw Exception::InvalidValue(__FILE__, __LINE__, OPENMS_PRETTY_FUNCTION,
"Unsupported residue encountered.", peptide);
A method or algorithm argument contains illegal values.
Definition Exception.h:633
Invalid value exception.
Definition Exception.h:306
int64_t Int64
Signed integer type (64bit)
Definition Types.h:40
OpenMS::Int64 getAAIndex(char aa)
Maps amino acid characters to 1-based token indices for PeptDeep models.
Definition PeptDeepUtils.h:32
constexpr int64_t PEPTDEEP_MOD_ELEMENTS
Definition PeptDeepUtils.h:19
const std::string PEPTDEEP_VALID_AAS
Definition PeptDeepUtils.h:20
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 (...
Definition PeptDeepUtils.h:59
void validatePeptide(const std::string &peptide)
Validates a peptide sequence for PeptDeep inference. Throws explicit OpenMS exceptions if the sequenc...
Definition PeptDeepUtils.h:43
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19