27 "C",
"H",
"N",
"O",
"P",
"S",
"B",
"F",
"I",
"K",
"U",
"V",
"W",
"X",
"Y",
28 "Ac",
"Ag",
"Al",
"Am",
"Ar",
"As",
"At",
"Au",
"Ba",
"Be",
"Bi",
"Bk",
29 "Br",
"Ca",
"Cd",
"Ce",
"Cf",
"Cl",
"Cm",
"Co",
"Cr",
"Cs",
"Cu",
"Dy",
30 "Er",
"Es",
"Eu",
"Fe",
"Fm",
"Fr",
"Ga",
"Gd",
"Ge",
"He",
"Hf",
"Hg",
31 "Ho",
"In",
"Ir",
"Kr",
"La",
"Li",
"Lr",
"Lu",
"Md",
"Mg",
"Mn",
"Mo",
32 "Na",
"Nb",
"Nd",
"Ne",
"Ni",
"No",
"Np",
"Os",
"Pa",
"Pb",
"Pd",
"Pm",
33 "Po",
"Pr",
"Pt",
"Pu",
"Ra",
"Rb",
"Re",
"Rh",
"Rn",
"Ru",
"Sb",
"Sc",
34 "Se",
"Si",
"Sm",
"Sn",
"Sr",
"Ta",
"Tb",
"Tc",
"Te",
"Th",
"Ti",
"Tl",
35 "Tm",
"Xe",
"Yb",
"Zn",
"Zr",
"2H",
"13C",
"15N",
"18O",
"?"
62 "QE",
"Lumos",
"timsTOF",
"SciexTOF",
"ThermoTOF"
77 auto upper = [](
char c) {
return (c >=
'a' && c <=
'z') ?
static_cast<char>(c - (
'a' -
'A')) : c; };
82 if (candidate.size() != name.size()) {
continue; }
85 for (
Size c = 0; c < name.size(); ++c)
87 if (upper(name[c]) != upper(candidate[c])) { same =
false;
break; }
89 if (same) {
return static_cast<int64_t
>(i); }
102 for (int64_t index : instrument_indices)
107 "Instrument index " + std::to_string(index) +
" is outside the range [0, "
109 "indices from ML::instrumentIndex() rather than passing literals.");
125 if (aa >=
'A' && aa <=
'Z')
return aa -
'A' + 1;
126 if (aa >=
'a' && aa <=
'z')
return aa -
'a' + 1;
136 if (peptide.empty()) {
A method or algorithm argument contains illegal values.
Definition Exception.h:633
int64_t Int64
Signed integer type (64bit)
Definition Types.h:40
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition Types.h:97
constexpr int64_t PEPTDEEP_MAX_INSTRUMENT_NUM
Width of the instrument one-hot in AlphaPeptDeep's MS2 model.
Definition PeptDeepUtils.h:48
OpenMS::Int64 getAAIndex(char aa)
Maps amino acid characters to 1-based token indices for PeptDeep models.
Definition PeptDeepUtils.h:124
constexpr int64_t PEPTDEEP_UNKNOWN_INSTRUMENT_INDEX
Index peptdeep gives an instrument it does not recognise (featurize.py: max_instrument_num - 1).
Definition PeptDeepUtils.h:51
int64_t instrumentIndex(std::string_view name)
Instrument index for name, mirroring peptdeep's parse_instrument_indices().
Definition PeptDeepUtils.h:75
constexpr int64_t PEPTDEEP_MOD_ELEMENTS
Definition PeptDeepUtils.h:21
constexpr std::array< std::string_view, 5 > ALPHAPEPTDEEP_INSTRUMENTS
AlphaPeptDeep's instrument names, in the order that is their encoding.
Definition PeptDeepUtils.h:61
void validateInstrumentIndices(const std::vector< int64_t > &instrument_indices)
Validates instrument indices for PeptDeep MS2 inference.
Definition PeptDeepUtils.h:100
void validatePeptide(const std::string &peptide)
Validates a peptide sequence for PeptDeep inference. Complex character validation and modification pa...
Definition PeptDeepUtils.h:135
constexpr std::array< std::string_view, 109 > ALPHAPEPTDEEP_MOD_ELEMENTS
AlphaPeptDeep's exact 109-element array for modification tensor mapping. Elements missing from this l...
Definition PeptDeepUtils.h:26
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19