OpenMS
Loading...
Searching...
No Matches
FragmentIndex::Peptide Struct Reference

Compact descriptor of a peptide instance held by the FragmentIndex. More...

#include <OpenMS/ANALYSIS/ID/FragmentIndex.h>

Collaboration diagram for FragmentIndex::Peptide:
[legend]

Public Member Functions

 Peptide (UInt32 protein_idx, uint32_t mod_bitmask, std::pair< uint16_t, uint16_t > sequence, float precursor_mz)
 

Public Attributes

UInt32 protein_idx
 0-based index into FASTA entries provided to build(); identifies the source protein
 
uint32_t mod_bitmask_
 Bitmask of active variable mod slots (0 = unmodified/fixed-only; up to 32 slots)
 
std::pair< uint16_t, uint16_t > sequence_
 {start, length} within the source protein sequence (start is 0-based; length in residues)
 
float precursor_mz_
 Mono-isotopic m/z at charge 1 (M+H)+ of this peptide; used for sorting/filtering.
 

Detailed Description

Compact descriptor of a peptide instance held by the FragmentIndex.

Field semantics and how they relate to the braced initializer lists used in tests {a, b, {c, d}, e}:

  • protein_idx .......... 'a' Index into the FASTA entries vector passed to build(); identifies the source protein.
  • mod_bitmask_ ......... 'b' Bitmask encoding which variable modification slots are active. Each bit corresponds to a (position, mod_type) pair found by scanning the sequence left-to-right against the variable modification config. 0 = unmodified (or fixed-only). Supports up to 32 variable mod slots.
  • sequence_ ............ '{c, d}' 0-based start offset and length (in residues) of the peptide subsequence within the protein. Note: length (d) is used like std::string::substr(start, length).
  • precursor_mz_ ........ 'e' Mono-isotopic m/z at charge 1 (M+H)+; used for ordering/slicing in the index. Many tests use a dummy value here since only ordering invariants are asserted.

Constructor & Destructor Documentation

◆ Peptide()

Peptide ( UInt32  protein_idx,
uint32_t  mod_bitmask,
std::pair< uint16_t, uint16_t >  sequence,
float  precursor_mz 
)
inline

Member Data Documentation

◆ mod_bitmask_

uint32_t mod_bitmask_

Bitmask of active variable mod slots (0 = unmodified/fixed-only; up to 32 slots)

◆ precursor_mz_

float precursor_mz_

Mono-isotopic m/z at charge 1 (M+H)+ of this peptide; used for sorting/filtering.

◆ protein_idx

UInt32 protein_idx

0-based index into FASTA entries provided to build(); identifies the source protein

◆ sequence_

std::pair<uint16_t , uint16_t> sequence_

{start, length} within the source protein sequence (start is 0-based; length in residues)