![]() |
OpenMS
|
Generates from a set of Fasta files a 2D-datastructure which stores all theoretical masses of all b and y ions from all peptides generated from the Fasta file. The datastructure is build such that on one axis the fragments are sorted by their own mass and the axis by the mass of their precursor/protein. The FI has two options: Bottom-up and Top Down. In later digestion is skiped and the fragments have a direct reference to the mass of the proteins instead of digested peptides. More...
#include <OpenMS/ANALYSIS/ID/FragmentIndex.h>
Classes | |
| struct | CandidateBlock_ |
| One (precursor charge, isotope error) block of a queryPeaks() call. More... | |
| struct | Fragment |
| One entry in the fragment index. More... | |
| struct | Hit |
| struct | IonOffsets |
| Precomputed ion-type mass offsets (from Residue::getInternalTo*Ion formulas) More... | |
| struct | ModShift_ |
| struct | ModSlot |
| A candidate modification slot for a specific peptide. More... | |
| struct | Peptide |
| Compact descriptor of a peptide instance held by the FragmentIndex. More... | |
| struct | PeptidoformRendering_ |
| Rendering classes of the configured modifications, for samePeptidoform_() (peptide:deduplicate) More... | |
| struct | RemovedOccurrence |
| A protein occurrence of an indexed peptidoform that peptide:deduplicate removed from the index. More... | |
| struct | SpectrumMatch |
| Match between a query peak and an entry in the DB. More... | |
| struct | SpectrumMatchesTopN |
| container for SpectrumMatch. Also keeps count of total number of candidates and total number of matches. More... | |
| struct | VarModEntry |
| Entry in the per-AA variable modification lookup table. More... | |
Public Member Functions | |
| FragmentIndex () | |
| Default constructor. | |
| ~FragmentIndex () override=default | |
| Default destructor. | |
| FragmentIndex (const FragmentIndex &)=default | |
| Copy and move operations. | |
| FragmentIndex & | operator= (const FragmentIndex &)=default |
| FragmentIndex (FragmentIndex &&)=default | |
| FragmentIndex & | operator= (FragmentIndex &&)=default |
| bool | isBuild () const |
| Indicates whether the fragment index has been built. | |
| const std::vector< Peptide > & | getPeptides () const |
| Returns a reference to the internal peptide container. | |
| const std::vector< RemovedOccurrence > & | getRemovedOccurrences () const noexcept |
| The protein occurrences that peptide:deduplicate removed, ordered by RemovedOccurrence::peptide_idx and, for one kept entry, in the order of the entries before deduplication (sortPeptides_() order). | |
| bool | hasProteinOccurrences (const std::vector< FASTAFile::FASTAEntry > &fasta_entries) const |
| Whether getProteinOccurrences() lists every span of the digest that has the residues of an index peptide. | |
| void | getProteinOccurrences (Size peptide_idx, const std::vector< FASTAFile::FASTAEntry > &fasta_entries, std::vector< std::pair< UInt32, UInt32 > > &occurrences) const |
Appends the protein occurrences {protein index, start} of the residues of getPeptides()[peptide_idx]. | |
| Size | getNumFragments () const noexcept |
| void | build (const std::vector< FASTAFile::FASTAEntry > &fasta_entries) |
| Given a set of Fasta files, builds the Fragment Index datastructure (FID). First all fragments are sorted by their own mass. Next they are placed in buckets. The min-fragment mass is stored for each bucket, whereupon the fragments are sorted within the buckets by their originating precursor mass. Replaces any previously built index; a failed build leaves isBuild() false. | |
| void | build (const std::vector< FASTAFile::FASTAEntry > &fasta_entries, const std::function< const MSExperiment *(Size)> &searched_spectra) |
| Builds the index like build(fasta_entries), but only with the peptides that the spectra to be searched can reach. | |
| void | clear () |
| Delete fragment index. Sets is_build=false. | |
| std::pair< size_t, size_t > | getPeptidesInMassWindow (float precursor_mass, const std::pair< float, float > &window) const |
Public Member Functions inherited from DefaultParamHandler | |
| DefaultParamHandler (const std::string &name) | |
| Constructor with name that is displayed in error messages. | |
| DefaultParamHandler (const DefaultParamHandler &rhs) | |
| Copy constructor. | |
| virtual | ~DefaultParamHandler () |
| Destructor. | |
| DefaultParamHandler & | operator= (const DefaultParamHandler &rhs) |
| Assignment operator. | |
| virtual bool | operator== (const DefaultParamHandler &rhs) const |
| Equality operator. | |
| void | setParameters (const Param ¶m) |
| Sets the parameters. | |
| const Param & | getParameters () const |
| Non-mutable access to the parameters. | |
| const Param & | getDefaults () const |
| Non-mutable access to the default parameters. | |
| const std::string & | getName () const |
| Non-mutable access to the name. | |
| void | setName (const std::string &name) |
| Mutable access to the name. | |
| const std::vector< std::string > & | getSubsections () const |
| Non-mutable access to the registered subsections. | |
Static Public Member Functions | |
| static bool | isOpenSearchMode (double lower_magnitude, double upper_magnitude, bool unit_ppm) noexcept |
| static void | checkFixedModifications (const StringList &fixed_modifications) |
| Rejects fixed terminal modifications that the index cannot restrict to the peptides they apply to. | |
| static StringList | shadowedVariableTerminalModifications (const StringList &fixed_modifications, const StringList &variable_modifications) |
| Variable terminal modifications that a fixed terminal modification excludes. | |
| static StringList | shadowedVariableResidueModifications (const StringList &fixed_modifications, const StringList &variable_modifications) |
| Variable residue modifications that a fixed modification of the same residue excludes. | |
Static Public Member Functions inherited from DefaultParamHandler | |
| static void | writeParametersToMetaValues (const Param &write_this, MetaInfoInterface &write_here, const std::string &key_prefix="") |
| Writes all parameters to meta values. | |
Peptide-mass mode (low_memory) | |
When the index is built in peptide-mass mode (isPeptideMassMode), a Peptide entry represents a mother peptide: the longest peptide (at most peptide:max_size residues) that starts at a position of a protein. Every sub-peptide of the non-specific digest is a prefix of the mother at its start, so the mothers hold the digest in one entry per protein position instead of one per (start, length, variable modifications) as the fragment index. The index holds no fragments of the mothers. Instead, its entries are the (M+H)+ of every unmodified prefix of a mother with a length in [peptide:min_size, peptide:max_size], sorted by mass. A query looks up the prefixes whose mass, shifted by any sum of variable modification deltas, lies in a precursor window, generates the fragments of each such peptidoform as the fragment index would (same ion series, fragment:min_ion_index and m/z range) and counts the peaks they match. The candidates and their numbers of matched fragments are therefore those of the fragment index, which needs far more memory for a non-specific digest. Only which of equally ranked candidates of one protein survive the cut to scoring:max_candidates_per_spectrum can differ (see querySpectrumPeptideMasses_()). | |
| bool | is_build_ {false} |
| true, if the database has been populated with fragments | |
| std::array< double, 128 > | fixed_mod_deltas_ {} |
| Per-AA fixed modification delta mass (0.0 if no fixed mod applies) | |
| std::array< const ResidueModification *, 128 > | fixed_mod_ptrs_ {} |
| Per-AA fixed modification pointer (nullptr if none) | |
| double | fixed_nterm_delta_ {0.0} |
| Fixed N-terminal mod delta (0 if none) | |
| double | fixed_cterm_delta_ {0.0} |
| Fixed C-terminal mod delta (0 if none) | |
| const ResidueModification * | fixed_nterm_mod_ptr_ {nullptr} |
| const ResidueModification * | fixed_cterm_mod_ptr_ {nullptr} |
| std::array< std::vector< VarModEntry >, 128 > | variable_mod_table_ {} |
| Per-AA variable modification table: for each ASCII char, list of possible variable mods. | |
| std::vector< VarModEntry > | variable_nterm_mods_ |
| Pure N-terminal variable mods (not residue-specific) | |
| std::vector< VarModEntry > | variable_cterm_mods_ |
| Pure C-terminal variable mods (not residue-specific) | |
| bool | mod_tables_initialized_ {false} |
| std::array< double, 128 > | fixed_residue_masses_ {} |
| bool | is_peptide_mass_mode_ {false} |
| std::vector< double > | sigma_delta_set_ |
| std::vector< double > | sigma_delta_set_with_prot_nterm_ |
| Peptide-mass mode: as sigma_delta_set_, with the PROTEIN_N_TERM variable modifications. | |
| std::vector< double > | sigma_delta_set_with_prot_cterm_ |
| Peptide-mass mode: as sigma_delta_set_, with the PROTEIN_C_TERM variable modifications. | |
| bool | zero_sigma_subsets_ {false} |
| std::vector< ModShift_ > | mod_shifts_ |
| double | min_mod_shift_ {0.0} |
| Peptide-mass mode: smallest and largest shift (0 if no variable modification is configured) | |
| double | max_mod_shift_ {0.0} |
| bool | entry_sites_ {false} |
| whether the entries carry the bound | |
| std::vector< Peptide > | fi_peptides_ |
| vector of all (digested) peptides | |
| std::vector< RemovedOccurrence > | removed_occurrences_ |
| occurrences removed by peptide:deduplicate (getRemovedOccurrences()) | |
| std::vector< Fragment > | fi_fragments_ |
| std::vector< Fragment > | electron_fragments_ |
| std::vector< float > | electron_bucket_min_mz_ |
| smallest fragment m/z of each bucket of electron_fragments_ | |
| std::vector< uint32_t > | protein_lengths_ |
| Protein lengths indexed by protein_idx, populated at build() time. | |
| float | fragment_min_mz_ |
| smallest fragment mz | |
| float | fragment_max_mz_ |
| largest fragment mz | |
| size_t | min_ion_index_ {0} |
| skip ions below this index (0=all, 2=skip b1/b2/y1/y2) | |
| size_t | bucketsize_ |
| number of fragments per outer node | |
| std::vector< float > | bucket_min_mz_ |
| vector of the smalles fragment mz of each bucket | |
| double | precursor_mass_tolerance_lower_ {20.0} |
| positive magnitude, effective lower bound is -lower | |
| double | precursor_mass_tolerance_upper_ {20.0} |
| positive magnitude, effective upper bound is +upper | |
| bool | precursor_mass_tolerance_unit_ppm_ {true} |
| float | fragment_mz_tolerance_ |
| bool | fragment_mz_tolerance_unit_ppm_ {true} |
| static constexpr size_t | MAX_MOD_SLOTS = 32 |
| max variable mod slots per peptide (uint32_t bitmask) | |
| static constexpr uint32_t | ENTRY_SITES_SHIFT_ = 28 |
| static constexpr uint32_t | ENTRY_MOTHER_MASK_ = (1u << ENTRY_SITES_SHIFT_) - 1 |
| static constexpr uint32_t | ENTRY_MAX_SITES_ = (1u << (32 - ENTRY_SITES_SHIFT_)) - 1 |
| static std::array< double, 128 > | residue_mass_table_ |
| static std::once_flag | mass_table_once_flag_ |
| static IonOffsets | ion_offsets_ |
| static constexpr size_t | SKIP_STRIDE_ = 64 |
| size_t | skip_per_bucket_ {0} |
| std::vector< UInt32 > | bucket_skip_ |
| std::vector< UInt32 > | electron_bucket_skip_ |
| bool | add_b_ions_ |
| bool | add_y_ions_ |
| bool | add_a_ions_ |
| bool | add_c_ions_ |
| bool | add_x_ions_ |
| bool | add_z_ions_ |
| bool | add_zp1_ions_ |
| bool | electron_ions_ {false} |
| ions:electron_ions: also index c and z+1 ions, in electron_fragments_ | |
| std::string | digestion_enzyme_ |
| EnzymaticDigestion::Specificity | enzyme_specificity_ {EnzymaticDigestion::SPEC_FULL} |
| 'full' (default), 'semi' (semi-tryptic), or 'none' (e.g. immunopeptidomics) | |
| bool | clip_nterm_methionine_ {false} |
| Include initial Met loss (enabled by ProSE). | |
| size_t | missed_cleavages_ |
| number of missed cleavages | |
| float | peptide_min_mass_ |
| float | peptide_max_mass_ |
| size_t | peptide_min_length_ |
| size_t | peptide_max_length_ |
| StringList | modifications_fixed_ |
| Modification that are one all peptides. | |
| StringList | modifications_variable_ |
| Variable Modification -> all possible comibnations are created. | |
| size_t | max_variable_mods_per_peptide_ |
| uint16_t | min_matched_peaks_ |
| PSM with less hits are discarded. | |
| int16_t | min_isotope_error_ |
| Minimal possible isotope error. | |
| int16_t | max_isotope_error_ |
| Maximal possible isotope error (both only used for closed search) | |
| uint16_t | min_precursor_charge_ |
| minimal possible precursor charge (usually always 1) | |
| uint16_t | max_precursor_charge_ |
| maximal possible precursor charge | |
| uint16_t | max_fragment_charge_ |
| The maximal possible charge of the fragments. | |
| uint32_t | max_processed_hits_ |
| The amount of PSM that will be used. the rest is filtered out. | |
| bool | deduplicate_ {false} |
| peptide:deduplicate | |
| bool | isPeptideMassMode () const noexcept |
| std::vector< Hit > | query (const Peak1D &peak, const std::pair< size_t, size_t > &peptide_idx_range, uint16_t peak_charge) |
| Queries one peak (against the ion series of the ions:add_*_ions parameters, not the c and z+1 ions of ions:electron_ions) | |
| void | querySpectrum (const MSSpectrum &spectrum, SpectrumMatchesTopN &sms) |
| : queries one complete experimental spectra against the Database. Loops over all precursor charges Starts at min_precursor_charge and iteratively goes to max_precursor_charge. We query all peaks multiple times with all the different precursor charges and corresponding precursor masses. Returns no matches in peptide-mass mode, which needs the FASTA entries (see the overload that takes them). | |
| void | querySpectrum (const MSSpectrum &spectrum, const std::vector< FASTAFile::FASTAEntry > &fasta_entries, SpectrumMatchesTopN &sms) |
| Query a spectrum against the fragment index with FASTA context. | |
| void | querySpectrum (const MSSpectrum &spectrum, const std::vector< FASTAFile::FASTAEntry > &fasta_entries, SpectrumMatchesTopN &sms, bool with_electron_ions) |
| Query a spectrum, optionally also against the c and z+1 ions of ions:electron_ions. | |
| AASequence | reconstructModifiedSequence (const Peptide &peptide, const std::vector< FASTAFile::FASTAEntry > &fasta_entries) const |
| Reconstruct a fully modified AASequence from a Peptide's bitmask. | |
| int | realizePrefixLength (const Peptide &mother, const std::vector< FASTAFile::FASTAEntry > &fasta_entries, double target_mh_plus, double tolerance_lower_magnitude, double tolerance_upper_magnitude, bool tolerance_ppm) const |
| Find the realized sub-peptide length of a mother that best matches the observed precursor mass. | |
| AASequence | reconstructRealizedSubSequence (const Peptide &mother, const std::vector< FASTAFile::FASTAEntry > &fasta_entries, size_t realized_length, uint32_t subset_bitmask=0) const |
| void | updateMembers_ () override |
| This method is used to update extra member variables at the end of the setParameters() method. | |
| void | generatePeptides (const std::vector< FASTAFile::FASTAEntry > &fasta_entries) |
| Generates all peptides from given fasta entries. If Bottom-up is set to false skips digestion. If set to true the Digestion enzyme can be set in the parameters. Additionally introduces fixed and variable modifications for restrictive PSM search. | |
| void | generateMothers_ (const std::vector< FASTAFile::FASTAEntry > &fasta_entries) |
| Peptide-mass mode peptide enumeration: emit the mother peptides. | |
| PeptidoformRendering_ | peptidoformRendering_ () const |
| Rendering classes of the configured modifications. Requires the modification tables (generatePeptides()). | |
| void | renderPeptidoform_ (const Peptide &peptide, const std::vector< FASTAFile::FASTAEntry > &fasta_entries, const PeptidoformRendering_ &rendering, std::vector< uint32_t > &tokens) const |
| bool | samePeptidoform_ (const Peptide &a, const Peptide &b, const std::vector< FASTAFile::FASTAEntry > &fasta_entries, const PeptidoformRendering_ &rendering, std::vector< uint32_t > &tokens_a, std::vector< uint32_t > &tokens_b) const |
Whether reconstructModifiedSequence() renders a and b to the same AASequence::toString(). | |
| Size | deduplicateByString_ (const std::vector< FASTAFile::FASTAEntry > &fasta_entries) |
| Keeps the first entry of fi_peptides_ of every reconstructModifiedSequence(...).toString(), in order. | |
| void | initModificationTables_ () |
| size_t | buildModSlots_ (const char *sequence, size_t seq_len, ModSlot *out_slots, bool is_protein_nterm=false, bool is_protein_cterm=false) const |
| std::vector< double > | computeSigmaDeltaSet_ (bool include_prot_nterm_mods, bool include_prot_cterm_mods) const |
| std::vector< std::vector< double > > | modShiftLevels_ (bool include_prot_nterm_mods, bool include_prot_cterm_mods) const |
| bool | nonemptyZeroSigmaSubsetExists_ () const |
| Whether a nonempty subset of at most max_variable_mods_per_peptide_ variable modifications has Σ = 0 (zero_sigma_subsets_) | |
| template<typename FragmentSink > | |
| void | generatePeptidoformFragments_ (FragmentSink &fragments, FragmentSink &electron_fragments, const char *sequence, size_t seq_len, UInt32 peptide_idx, uint32_t slot_bits, const ModSlot *slots, size_t n_slots, std::vector< double > &mod_masses) const |
| Generates the fragments of a peptidoform, as the index holds them. | |
| template<typename F > | |
| void | forEachPrefixMass_ (const char *sequence, size_t len, F &&f) const |
| template<typename FragmentSink > | |
| void | generateFragmentsLightweight_ (FragmentSink &fragments, FragmentSink &electron_fragments, const char *sequence, size_t seq_len, UInt32 peptide_idx, double n_term_mod_mass, double c_term_mod_mass, const double *residue_masses, const double *residue_mod_masses) const |
| template<typename FragmentSink > | |
| void | generateFragmentsForSeries_ (FragmentSink &fragments, const char *sequence, size_t seq_len, UInt32 peptide_idx, double n_term_mod_mass, double c_term_mod_mass, const double *residue_masses, const double *residue_mod_masses, bool add_b, bool add_a, bool add_c, bool add_y, bool add_x, bool add_z, bool add_zp1) const |
| static void | sortPeptides_ (std::vector< Peptide > &peptides, size_t min_task_size=8192) |
Sorts peptides by (precursor_mz_, protein_idx), exactly as std::sort does with that comparator. | |
| static void | initResidueMassTable_ () |
| void | querySpectrumPeptideMasses_ (const MSSpectrum &spectrum, const std::vector< FASTAFile::FASTAEntry > &fasta_entries, SpectrumMatchesTopN &sms, bool with_electron_ions) |
| Peptide-mass mode spectrum query: the candidates and matched-fragment counts of the fragment index. | |
| void | queryPeaks (SpectrumMatchesTopN &candidates, const MSSpectrum &spectrum, const std::vector< CandidateBlock_ > &blocks, const uint16_t precursor_charge, const bool with_electron_ions) |
Counts fragment matches for the (isotope error) blocks of ONE precursor charge and appends the surviving candidates to candidates. | |
| void | buildSkipTables_ () |
| Fills the skip tables; called by build() once the buckets are sorted. | |
| void | searchDifferentPrecursorRanges (const MSSpectrum &spectrum, float precursor_mass, SpectrumMatchesTopN &sms, uint16_t charge, bool with_electron_ions) |
| If closed search collects the candidate ranges of all isotope errors and loops over all peaks once for them with queryPeaks. | |
| void | sortAndBucketFragments_ (std::vector< Fragment > &fragments, std::vector< float > &bucket_min_mz, int num_threads) |
| void | trimHits (SpectrumMatchesTopN &init_hits) const |
| places the k-largest elements in the front of the input array. Inside of the k-largest elements and outside the elements are not sorted | |
| bool | isProteinNTerminal_ (const std::string &protein, Size start) const |
| Whether a position is the original or, with Met clipping enabled, mature protein N-terminus. | |
| bool | isOpenSearchMode_ () const noexcept |
| Instance delegate — same rule, reads the member bounds. | |
| std::pair< float, float > | computeMassWindow_ (float precursor_mass) const |
| void | keepPeptidesInPrecursorWindows_ (const MSExperiment &spectra) |
Additional Inherited Members | |
Protected Member Functions inherited from DefaultParamHandler | |
| void | defaultsToParam_ () |
| Updates the parameters after the defaults have been set in the constructor. | |
Protected Attributes inherited from DefaultParamHandler | |
| Param | param_ |
| Container for current parameters. | |
| Param | defaults_ |
| Container for default parameters. This member should be filled in the constructor of derived classes! | |
| std::vector< std::string > | subsections_ |
| Container for registered subsections. This member should be filled in the constructor of derived classes! | |
| std::string | error_name_ |
| Name that is displayed in error messages during the parameter checking. | |
| bool | check_defaults_ |
| If this member is set to false no checking if parameters in done;. | |
| bool | warn_empty_defaults_ |
| If this member is set to false no warning is emitted when defaults are empty;. | |
Generates from a set of Fasta files a 2D-datastructure which stores all theoretical masses of all b and y ions from all peptides generated from the Fasta file. The datastructure is build such that on one axis the fragments are sorted by their own mass and the axis by the mass of their precursor/protein. The FI has two options: Bottom-up and Top Down. In later digestion is skiped and the fragments have a direct reference to the mass of the proteins instead of digested peptides.
| struct OpenMS::FragmentIndex::CandidateBlock_ |
One (precursor charge, isotope error) block of a queryPeaks() call.
| struct OpenMS::FragmentIndex::IonOffsets |
Precomputed ion-type mass offsets (from Residue::getInternalTo*Ion formulas)
| struct OpenMS::FragmentIndex::ModShift_ |
Peptide-mass mode: a shift Σ at which querySpectrumPeptideMasses_() looks up prefixes. A peptidoform belongs to the shift closest to the sum of its modification deltas.
| struct OpenMS::FragmentIndex::RemovedOccurrence |
A protein occurrence of an indexed peptidoform that peptide:deduplicate removed from the index.
The removed entry had the same peptidoform (reconstructModifiedSequence(...).toString()) as the kept entry getPeptides()[peptide_idx], hence the same length; it started at start in protein protein_idx.
| Class Members | ||
|---|---|---|
| UInt32 | peptide_idx | index into getPeptides() of the kept entry of the same peptidoform |
| UInt32 | protein_idx | protein of the removed entry (index into the FASTA entries passed to build()) |
| uint16_t | start | 0-based start of the removed entry in that protein |
| struct OpenMS::FragmentIndex::SpectrumMatch |
Match between a query peak and an entry in the DB.
| struct OpenMS::FragmentIndex::VarModEntry |
Entry in the per-AA variable modification lookup table.
| Class Members | ||
|---|---|---|
| double | delta_mass | mass delta from this modification |
| const ResidueModification * | mod_ptr | pointer to the modification (for AASequence reconstruction) |
| TermSpecificity | term_spec | where this mod can be applied |
| FragmentIndex | ( | ) |
Default constructor.
Initializes an empty FragmentIndex. Call build() before using any query functions. After clear(), the index returns to this unbuilt state.
Thread-safety: constructing the object is thread-safe as long as the instance is not shared across threads before initialization completes.
|
overridedefault |
Default destructor.
Releases owned memory. If the index was built, all internal buffers and fragment buckets are freed. No exceptions are thrown.
|
default |
Copy and move operations.
Declared explicitly because the user-declared destructor above suppresses the implicit move operations: without them, every move of a FragmentIndex (and of a ProSEAlgorithm::SearchContext that holds one) copies the whole index.
|
default |
| void build | ( | const std::vector< FASTAFile::FASTAEntry > & | fasta_entries | ) |
Given a set of Fasta files, builds the Fragment Index datastructure (FID). First all fragments are sorted by their own mass. Next they are placed in buckets. The min-fragment mass is stored for each bucket, whereupon the fragments are sorted within the buckets by their originating precursor mass. Replaces any previously built index; a failed build leaves isBuild() false.
| [in] | fasta_entries | The FASTA entries used to build the index. |
| void build | ( | const std::vector< FASTAFile::FASTAEntry > & | fasta_entries, |
| const std::function< const MSExperiment *(Size)> & | searched_spectra | ||
| ) |
Builds the index like build(fasta_entries), but only with the peptides that the spectra to be searched can reach.
Once the peptides are generated and sorted, searched_spectra is called with their number (to judge whether waiting for spectra that are still being read pays off); it may block. If it returns spectra, every peptide whose precursor mass lies in none of their precursor windows (each charge and isotope error querySpectrum() tries, widened by a margin) is removed before the fragments are generated (after peptide:deduplicate has chosen the kept entry of every peptidoform among all of its entries). The others keep their order, so querySpectrum() returns the same candidates for these spectra as with the full index, from an index that is built faster and takes less memory. Search the index only with these spectra and the current parameters. The full index is built if searched_spectra is empty or returns nullptr, and in peptide-mass and open search mode.
| [in] | fasta_entries | The FASTA entries used to build the index. |
| [in] | searched_spectra | Called with the number of peptides; returns the spectra the index will be searched with, or nullptr. |
|
protected |
Scan a peptide sequence to find all variable modification slots. Returns the number of slots written to out_slots (at most MAX_MOD_SLOTS). Deterministic ordering: N-term pure-terminal mods, then left-to-right residue mods (ANYWHERE as residue slots; residue-specific terminal ones, e.g. Gln->pyro-Glu (N-term Q), as NTERM_SLOT/CTERM_SLOT, which AASequence holds as terminal modifications), then C-term pure-terminal mods. As in ModifiedPeptideGenerator, residues with a fixed modification get no variable residue slot (a residue-specific terminal modification still gets its terminal slot), and a terminus with a fixed terminal modification no terminal one.
| sequence | raw amino acid character array |
| seq_len | length of the sequence |
| out_slots | output array for modification slots (must have space for MAX_MOD_SLOTS entries) |
| is_protein_nterm | true if this peptide starts at protein position 0 |
| is_protein_cterm | true if this peptide ends at the last protein residue |
|
private |
Fills the skip tables; called by build() once the buckets are sorted.
|
static |
Rejects fixed terminal modifications that the index cannot restrict to the peptides they apply to.
A fixed terminal modification adds one N- or C-terminal mass to every peptide of the index. A protein-terminal fixed modification (e.g. 'Acetyl (Protein N-term)') or a residue-specific terminal one (e.g. 'Gln->pyro-Glu (N-term Q)') applies to some peptides only, and a terminus carries one modification. As variable modifications (modifications:variable) they are applied to the eligible peptides only.
| [in] | fixed_modifications | Names of the fixed modifications (as in modifications:fixed) |
| Exception::InvalidParameter | for a protein-terminal or residue-specific terminal fixed modification, or for a second fixed modification on the same terminus |
| void clear | ( | ) |
Delete fragment index. Sets is_build=false.
|
private |
Compute the signed mass window {lo, hi} around a precursor_mass, converting ppm → Da if the unit is ppm. lo is negative (or zero), hi is positive (or zero). This is the only place where positive member magnitudes become signed offsets.
|
protected |
Enumerate distinct Σ values achievable by any subset of configured variable mods with popcount ≤ max_variable_mods_per_peptide_. Configuration-global; does not consider per-peptide residue inventory. Per-peptide applicability is enforced at query-time subset enumeration.
| include_prot_nterm_mods | include mods with PROTEIN_N_TERM specificity |
| include_prot_cterm_mods | include mods with PROTEIN_C_TERM specificity |
|
protected |
Keeps the first entry of fi_peptides_ of every reconstructModifiedSequence(...).toString(), in order.
peptide:deduplicate for configurations in which equal peptidoforms need not lie in one run of equal precursor_mz_ (see PeptidoformRendering_::runs_hold_peptidoforms); build() handles the others while it generates the fragments. Records the removed entries in removed_occurrences_.
|
protected |
Calls f(k, mass) for k = 1 .. len with the (M+H)+ of the first k residues of sequence, with fixed modifications, computed as generatePeptides() computes that of a peptide (so that their float roundings agree). Stops early once f returns false.
|
protected |
Fragment generation with explicit per-call ion-series selection.
generateFragmentsLightweight_ forwards to this function after packing the class flags; both share a single implementation.
| [out] | fragments | Receives the fragments through emplace_back(peptide_idx, mz) |
| [in] | sequence | Raw amino acid string (no modifications) |
| [in] | seq_len | Length of sequence |
| [in] | peptide_idx | Index of this peptide in fi_peptides_ |
| [in] | n_term_mod_mass | Mass delta from N-terminal modification (0 if none) |
| [in] | c_term_mod_mass | Mass delta from C-terminal modification (0 if none) |
| [in] | residue_masses | Mass of a residue by its character (128 doubles) |
| [in] | residue_mod_masses | Per-residue modification mass deltas (nullptr if none; array of seq_len doubles) |
| [in] | add_b | Emit b-ions (prefix). |
| [in] | add_a | Emit a-ions (prefix). |
| [in] | add_c | Emit c-ions (prefix). |
| [in] | add_y | Emit y-ions (suffix). |
| [in] | add_x | Emit x-ions (suffix). |
| [in] | add_z | Emit z-ions (suffix). |
| [in] | add_zp1 | Emit z+1 ions (z-dot, suffix). |
|
protected |
Lightweight fragment generation: compute b/y ion m/z directly from amino acid chars. Bypasses AASequence::fromString and TheoreticalSpectrumGenerator. Uses the class-level add_b_ions_ / add_y_ions_ / ... flags for the ion series selection. See generateFragmentsForSeries_ for the explicit-flag variant.
| [out] | fragments | Receives the fragments through emplace_back(peptide_idx, mz): a vector of Fragment, or one of the counting / placing sinks of build() |
| [out] | electron_fragments | The same for the c and z+1 ions of ions:electron_ions that the series above lack (untouched if ions:electron_ions is off) |
| [in] | sequence | Raw amino acid string (no modifications) |
| [in] | seq_len | Length of sequence |
| [in] | peptide_idx | Index of this peptide in fi_peptides_ |
| [in] | n_term_mod_mass | Mass delta from N-terminal modification (0 if none) |
| [in] | c_term_mod_mass | Mass delta from C-terminal modification (0 if none) |
| [in] | residue_masses | Mass of a residue by its character (128 doubles): residue_mass_table_, or that with the deltas of the fixed modifications added |
| [in] | residue_mod_masses | Per-residue modification mass deltas (nullptr if none; array of seq_len doubles) |
|
protected |
Peptide-mass mode peptide enumeration: emit the mother peptides.
Called instead of the usual enzymatic-digestion path when is_peptide_mass_mode_ is true. For each span of indexable residues [s, e) of a protein (split at X/B/Z, stop codons and other symbols), emits one mother at every position i in [s, e - min_length], spanning residues [i, i + min(max_length, e - i)). Every sub-peptide of the span with a length of at least min_length is a prefix of one of them. Mothers too light to reach peptide:min_mass with any variable modifications are skipped. The mothers are sorted by mass.
| [in] | fasta_entries | Protein database (same semantics as generatePeptides). |
|
protected |
Generates all peptides from given fasta entries. If Bottom-up is set to false skips digestion. If set to true the Digestion enzyme can be set in the parameters. Additionally introduces fixed and variable modifications for restrictive PSM search.
| [in] | fasta_entries |
|
protected |
Generates the fragments of a peptidoform, as the index holds them.
The one implementation of the fragments of an index entry: build() uses it for the fragment-index entries, the peptide-mass query for the peptidoforms it realizes, so that both count the same fragments.
| [out] | fragments | Receives the fragments of the ion series of ions:add_*_ions (see generateFragmentsLightweight_) |
| [out] | electron_fragments | Receives the c and z+1 ions of ions:electron_ions that these lack |
| [in] | sequence | Residues of the peptide |
| [in] | seq_len | Number of residues |
| [in] | peptide_idx | Passed on to the sinks |
| [in] | slot_bits | Active variable modification slots (0: unmodified) |
| [in] | slots | The slots of the peptide (buildModSlots_()); only read if slot_bits is not 0 |
| [in] | n_slots | Number of slots |
| mod_masses | Scratch buffer |
|
inlinenoexcept |
Number of theoretical fragments stored in the index (0 before build()), including the c and z+1 ions of ions:electron_ions. In peptide-mass mode: the number of prefix masses (one per unmodified sub-peptide).
| const std::vector< Peptide > & getPeptides | ( | ) | const |
Returns a reference to the internal peptide container.
Provides read-only access to all peptides currently held by the index, typically populated during build(). With peptide:deduplicate=true, fragment-index entries retain one representative protein coordinate per exact peptidoform, not every protein occurrence (getProteinOccurrences() lists them all).
Preconditions: The vector may be empty if build() has not been called yet. Thread-safety: read-only view; safe to access concurrently as long as no thread mutates the index (e.g., build()/clear()).
| std::pair< size_t, size_t > getPeptidesInMassWindow | ( | float | precursor_mass, |
| const std::pair< float, float > & | window | ||
| ) | const |
Return the [begin_idx, end_idx) peptide index range such that fi_peptides_[i].precursor_mz_ ∈ [precursor_mass + window.first, precursor_mass + window.second] for all i in the returned range.
| [in] | precursor_mass | The mono-charged precursor mass (M+H). |
| [in] | window | Signed absolute offsets around the precursor mass. By convention window.first is <= 0 and window.second is >= 0 (produced by computeMassWindow_). A reversed window trivially returns an empty range; no diagnostic is emitted. No hidden tolerance is added. |
fi_peptides_. | void getProteinOccurrences | ( | Size | peptide_idx, |
| const std::vector< FASTAFile::FASTAEntry > & | fasta_entries, | ||
| std::vector< std::pair< UInt32, UInt32 > > & | occurrences | ||
| ) | const |
Appends the protein occurrences {protein index, start} of the residues of getPeptides()[peptide_idx].
These are the spans of the digest of build() with the same residues, including those of the entries that peptide:deduplicate removed from getPeptides() (getRemovedOccurrences()); each span once, in no particular order. They are complete only if hasProteinOccurrences(). Spans the digest did not produce (with ambiguous residues, outside of enzymatic cleavage sites, ...) are not listed.
| [in] | peptide_idx | Index into getPeptides() |
| [in] | fasta_entries | The FASTA entries the index was built from |
| [out] | occurrences | Receives the occurrences (appended) |
Thread-safety: read-only; may be called concurrently.
|
inlinenoexcept |
The protein occurrences that peptide:deduplicate removed, ordered by RemovedOccurrence::peptide_idx and, for one kept entry, in the order of the entries before deduplication (sortPeptides_() order).
A kept entry's protein occurrences are its own coordinate plus its removed occurrences, so a caller can map the indexed peptides to proteins without searching the database again. Empty without deduplication (and for peptide-mass indices, which are not deduplicated); released by clear(). In chunked searches every chunk has its own index, and a peptidoform that occurs in several chunks is listed in each of them.
| bool hasProteinOccurrences | ( | const std::vector< FASTAFile::FASTAEntry > & | fasta_entries | ) | const |
Whether getProteinOccurrences() lists every span of the digest that has the residues of an index peptide.
build() gives every span of its digest one entry per combination of variable modification slots (mod_bitmask_). If the slots and masses of a span depend on its residues only, every span with the residues of an entry holds an entry with the same mod_bitmask_ and the same precursor_mz_ (the masses are added in the same order), i.e. one in the same run of equal precursor_mz_. That holds unless the index is in peptide-mass mode (its entries are mother peptides) or a protein-terminal modification is configured (its sites depend on where a span lies in its protein).
| [in] | fasta_entries | The FASTA entries the index was built from (checked: their number and lengths). |
|
protected |
Build per-AA modification lookup tables from modifications_fixed_ and modifications_variable_. Called once at the start of generatePeptides().
|
staticprotected |
| bool isBuild | ( | ) | const |
Indicates whether the fragment index has been built.
Thread-safety: read-only and can be called concurrently with other read-only methods. Must not race with build()/clear() on the same instance.
|
inlinestaticnoexcept |
Shared auto-detection: open-search iff max(lower, upper) > threshold (1000 ppm or 1 Da). Strict >: exactly 1000 ppm stays closed. This is the single source of truth for the open-search auto-detection rule and is reused by ProSEAlgorithm and the TOPP tool.
|
inlineprivatenoexcept |
Instance delegate — same rule, reads the member bounds.
|
inlinenoexcept |
|
private |
Whether a position is the original or, with Met clipping enabled, mature protein N-terminus.
|
private |
Removes the peptides (sorted by precursor_mz_) whose precursor mass lies in no precursor window of the MS2 spectra of spectra, keeping the order of the others (see build(fasta_entries, searched_spectra)). Removed occurrences recorded before (removed_occurrences_) follow their kept entries to their new indices or are dropped with them.
|
protected |
The sums of exactly m deltas of the configured variable mods (with repetition), distinct within 1e-6 Da, for m = 0..max_variable_mods_per_peptide_ (level 0: {0}; only level 0 without variable mods). Flags as in computeSigmaDeltaSet_().
|
protected |
Whether a nonempty subset of at most max_variable_mods_per_peptide_ variable modifications has Σ = 0 (zero_sigma_subsets_)
|
default |
|
default |
|
protected |
Rendering classes of the configured modifications. Requires the modification tables (generatePeptides()).
| std::vector< Hit > query | ( | const Peak1D & | peak, |
| const std::pair< size_t, size_t > & | peptide_idx_range, | ||
| uint16_t | peak_charge | ||
| ) |
Queries one peak (against the ion series of the ions:add_*_ions parameters, not the c and z+1 ions of ions:electron_ions)
| [in] | peak | The queried peak |
| [in] | peptide_idx_range | The range of precursors/peptides the peptide could potentially belongs to |
| [in] | peak_charge | The charge of the peak. Is used to calculate the mass from the mz |
|
private |
Counts fragment matches for the (isotope error) blocks of ONE precursor charge and appends the surviving candidates to candidates.
Every peak of spectrum is walked against the fragment buckets at fragment charges 1..min(precursor_charge, fragment:max_charge) — once for all blocks — and the hits are counted per block and peptide of its range. Only candidates reaching fragment:min_matched_ions — clamped to at least one matched peak, so a candidate that matched nothing is never a candidate — are emitted, block after block and in ascending peptide index within a block. Candidates that could not survive trimHits are therefore never materialized.
| [in,out] | candidates | Accumulator the blocks' matches are APPENDED to. Must NOT be pre-sized — entries are appended, never indexed into. Pre-existing entries are preserved, so one container can accumulate several calls. |
| [in] | spectrum | The queried experimental spectrum |
| [in] | blocks | The candidate ranges and their isotope errors; non-empty ranges, disjoint and ascending (first of a block >= second of its predecessor) |
| [in] | precursor_charge | The applied precursor charge |
| [in] | with_electron_ions | Also count matches to the c and z+1 ions of ions:electron_ions |
| void querySpectrum | ( | const MSSpectrum & | spectrum, |
| const std::vector< FASTAFile::FASTAEntry > & | fasta_entries, | ||
| SpectrumMatchesTopN & | sms | ||
| ) |
Query a spectrum against the fragment index with FASTA context.
Required in peptide-mass mode: the FASTA is needed to realize the sub-peptides of the mothers. The caller must pass the entries passed to build(), in the same order: the index holds only prefix masses and reads the residues, termini and modification sites of the candidates from fasta_entries. Only a different number of entries is detected (no matches are returned then); different entries of the same number give candidates that do not belong to the index. The fragment-index path ignores the fasta_entries argument.
| [in] | spectrum | Experimental spectrum with a single precursor. |
| [in] | fasta_entries | The FASTA entries passed to build(), in the same order. |
| [out] | sms | Accumulated candidate matches. |
| void querySpectrum | ( | const MSSpectrum & | spectrum, |
| const std::vector< FASTAFile::FASTAEntry > & | fasta_entries, | ||
| SpectrumMatchesTopN & | sms, | ||
| bool | with_electron_ions | ||
| ) |
Query a spectrum, optionally also against the c and z+1 ions of ions:electron_ions.
As querySpectrum(spectrum, fasta_entries, sms). Candidates are ranked by their number of matched fragments before scoring:max_candidates_per_spectrum cuts them. With with_electron_ions, matches to the c and z+1 ions indexed by ions:electron_ions count as well, as if the ion series above held them; without, the candidates are those of an index without these ions. Use it for electron-activated spectra, so that the c and z+1 ions do not change the candidates of other spectra.
| [in] | spectrum | Experimental spectrum with a single precursor. |
| [in] | fasta_entries | The FASTA database passed to build(). |
| [out] | sms | Accumulated candidate matches. |
| [in] | with_electron_ions | Also match the c and z+1 ions of ions:electron_ions. |
| void querySpectrum | ( | const MSSpectrum & | spectrum, |
| SpectrumMatchesTopN & | sms | ||
| ) |
: queries one complete experimental spectra against the Database. Loops over all precursor charges Starts at min_precursor_charge and iteratively goes to max_precursor_charge. We query all peaks multiple times with all the different precursor charges and corresponding precursor masses. Returns no matches in peptide-mass mode, which needs the FASTA entries (see the overload that takes them).
| [in] | spectrum | experimental spectrum |
| [out] | sms | The n best Spectrum matches |
|
private |
Peptide-mass mode spectrum query: the candidates and matched-fragment counts of the fragment index.
For each precursor charge and isotope error, and each shift Σ of mod_shifts_, the index entries (unmodified prefixes of the mothers, sorted by (M+H)+) whose mass plus Σ can lie in the precursor window are looked up and realized: their peptidoforms that belong to Σ (the unmodified one at Σ = 0, combinations of at most variable_max_per_peptide variable modifications) and whose (M+H)+ lies in the precursor window and in [peptide:min_mass, peptide:max_mass] are the candidates, exactly those that the fragment index holds in the window. The fragments of each candidate are generated as the fragment index generates them and matched against the peaks with the windows of queryPeaks(); candidates with at least fragment:min_matched_ions matches are kept (with peptide:deduplicate, one per peptidoform) and cut to scoring:max_candidates_per_spectrum in the order of trimHits(). Ties are broken by (precursor m/z, protein, start, length, modification subset). The fragment index orders its peptides by precursor m/z and protein only and leaves the order within a protein to the sort algorithm, so a cut through equally ranked candidates of one protein can keep other candidates than the fragment index.
Only called when isPeptideMassMode is true.
| [in] | spectrum | Experimental spectrum with a single precursor. |
| [in] | fasta_entries | Source database passed to build(). |
| [out] | sms | Accumulated candidate matches; SpectrumMatch::realized_length_ and subset_bitmask_ name the realized peptidoform. |
| [in] | with_electron_ions | Also count matches to the c and z+1 ions of ions:electron_ions |
| int realizePrefixLength | ( | const Peptide & | mother, |
| const std::vector< FASTAFile::FASTAEntry > & | fasta_entries, | ||
| double | target_mh_plus, | ||
| double | tolerance_lower_magnitude, | ||
| double | tolerance_upper_magnitude, | ||
| bool | tolerance_ppm | ||
| ) | const |
Find the realized sub-peptide length of a mother that best matches the observed precursor mass.
Scans realizable lengths k in [peptide_min_length_, mother.sequence_.second] from the start of the mother, computing the cumulative residue mass plus fixed modifications. Returns the length whose realized (M+H)+ mass is closest to target_mh_plus within the given tolerance, or -1 if no length satisfies the tolerance.
Must only be called in peptide-mass mode; returns -1 immediately otherwise.
| [in] | mother | A mother peptide. |
| [in] | fasta_entries | Source database (same one passed to build()). |
| [in] | target_mh_plus | Observed (M+H)+ mass after isotope-error correction. |
| [in] | tolerance_lower_magnitude | Positive tolerance magnitude on the low side (realized_mass - target >= -tolerance_lower_magnitude). |
| [in] | tolerance_upper_magnitude | Positive tolerance magnitude on the high side (realized_mass - target <= +tolerance_upper_magnitude). |
| [in] | tolerance_ppm | True if the magnitudes are in ppm. |
| AASequence reconstructModifiedSequence | ( | const Peptide & | peptide, |
| const std::vector< FASTAFile::FASTAEntry > & | fasta_entries | ||
| ) | const |
Reconstruct a fully modified AASequence from a Peptide's bitmask.
Used for result output - only called for final hits (not in the build hot path). Applies fixed modifications, then uses the bitmask to determine which variable modifications are active at which positions.
| [in] | peptide | The Peptide descriptor with mod_bitmask_ |
| [in] | fasta_entries | The FASTA database used during build() |
| AASequence reconstructRealizedSubSequence | ( | const Peptide & | mother, |
| const std::vector< FASTAFile::FASTAEntry > & | fasta_entries, | ||
| size_t | realized_length, | ||
| uint32_t | subset_bitmask = 0 |
||
| ) | const |
Reconstruct a realized sub-peptide (the first realized_length residues of the mother) as an AASequence.
| mother | the mother Peptide entry |
| fasta_entries | the FASTA entries used to build the index |
| realized_length | the length of the realized sub-peptide (SpectrumMatch::realized_length_) |
| subset_bitmask | active slots from buildModSlots_(seq_ptr, realized_length, ...) to apply as variable modifications (SpectrumMatch::subset_bitmask_). 0 = unmodified. |
|
protected |
Token sequence of reconstructModifiedSequence(peptide).toString(): [N-term, residue 0, ..., residue len-1, C-term]; a residue byte or modification class each, 0 for no terminal modification.
|
protected |
Whether reconstructModifiedSequence() renders a and b to the same AASequence::toString().
Compares residues and the rendering of the modification at each position instead of building the strings. Requires rendering.runs_hold_peptidoforms. tokens_a and tokens_b are scratch buffers.
|
private |
If closed search collects the candidate ranges of all isotope errors and loops over all peaks once for them with queryPeaks.
If open search applies a precursor-mass window
| [in] | spectrum | experimental query-spectrum |
| [in] | precursor_mass | The mass of the precursor (mz * charge) |
| [out] | sms | The Top m SpectrumMatches |
| [in] | charge | Applied charge |
| [in] | with_electron_ions | Also count matches to the c and z+1 ions of ions:electron_ions |
|
static |
Variable residue modifications that a fixed modification of the same residue excludes.
A residue carries one modification. A variable modification of a residue anywhere in the peptide (e.g. 'Glutathione (C)', or 'Carbamidomethyl (C)' configured as fixed and variable) is therefore not searched where a fixed one (e.g. 'Carbamidomethyl (C)') sits, as in ModifiedPeptideGenerator. Terminal modifications with a residue preference (e.g. 'Ammonia-loss (N-term C)') sit on the terminus and are searched next to it.
| [in] | fixed_modifications | Names of the fixed modifications (as in modifications:fixed) |
| [in] | variable_modifications | Names of the variable modifications (as in modifications:variable) |
|
static |
Variable terminal modifications that a fixed terminal modification excludes.
A terminus carries one modification. A variable peptide- or protein-terminal modification (e.g. 'Acetyl (Protein N-term)') is therefore not searched where a fixed one (e.g. 'TMT6plex (N-term)') sits on that terminus. This also applies to terminal modifications with a residue preference (e.g. 'Gln->pyro-Glu (N-term Q)'), which AASequence stores on the terminus as well.
| [in] | fixed_modifications | Names of the fixed modifications (as in modifications:fixed) |
| [in] | variable_modifications | Names of the variable modifications (as in modifications:variable) |
|
private |
Sorts fragments by m/z, cuts them into buckets of bucketsize_ and sorts each bucket by peptide index; bucket_min_mz receives the smallest m/z of each bucket.
|
staticprotected |
Sorts peptides by (precursor_mz_, protein_idx), exactly as std::sort does with that comparator.
"Exactly" includes the order of peptides with equal keys: the comparator covers neither mod_bitmask_ nor sequence_, std::sort is not stable, and the resulting order defines the peptide indices and thereby the search results. With libstdc++ and OpenMP, inputs of more than min_task_size peptides are sorted by a multi-threaded reproduction of libstdc++'s std::sort; everything else calls std::sort.
| [in,out] | peptides | Peptides to sort |
| [in] | min_task_size | Parts of at most this many peptides are sorted by the thread that created them |
|
private |
places the k-largest elements in the front of the input array. Inside of the k-largest elements and outside the elements are not sorted
|
overrideprotectedvirtual |
This method is used to update extra member variables at the end of the setParameters() method.
Also call it at the end of the derived classes' copy constructor and assignment operator.
The default implementation is empty.
Reimplemented from DefaultParamHandler.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
protected |
vector of the smalles fragment mz of each bucket
|
private |
|
protected |
number of fragments per outer node
|
private |
Include initial Met loss (enabled by ProSE).
|
private |
peptide:deduplicate
|
private |
|
protected |
smallest fragment m/z of each bucket of electron_fragments_
|
private |
|
protected |
The c and z+1 ions of ions:electron_ions that fi_fragments_ lacks. They are bucketed on their own (electron_bucket_min_mz_) and matched only when a query asks for them.
|
private |
ions:electron_ions: also index c and z+1 ions, in electron_fragments_
|
staticconstexprprotected |
|
staticconstexprprotected |
|
protected |
whether the entries carry the bound
|
staticconstexprprotected |
Peptide-mass mode: the index entries carry an upper bound of the variable modification sites of their prefix in the bits above ENTRY_SITES_SHIFT_ of Fragment::peptide_idx_ (if the mothers leave them free, see build())
|
private |
'full' (default), 'semi' (semi-tryptic), or 'none' (e.g. immunopeptidomics)
|
protected |
vector of all theoretical fragments (b- and y- ions)
|
protected |
vector of all (digested) peptides
|
protected |
Fixed C-terminal mod delta (0 if none)
|
protected |
|
protected |
Per-AA fixed modification delta mass (0.0 if no fixed mod applies)
|
protected |
Per-AA fixed modification pointer (nullptr if none)
|
protected |
Fixed N-terminal mod delta (0 if none)
|
protected |
|
protected |
|
protected |
largest fragment mz
|
protected |
smallest fragment mz
|
protected |
|
protected |
|
staticprotected |
|
protected |
true, if the database has been populated with fragments
|
protected |
Peptide-mass mode state. Set in updateMembers_ from low_memory and peptide:enzyme_specificity. When true, generatePeptides dispatches to generateMothers_, build() indexes the prefix masses of the mothers and querySpectrum() runs querySpectrumPeptideMasses_(). When false, no peptide-mass code path is active.
|
staticprotected |
|
private |
The maximal possible charge of the fragments.
|
private |
Maximal possible isotope error (both only used for closed search)
|
protected |
|
staticconstexprprotected |
max variable mod slots per peptide (uint32_t bitmask)
|
private |
maximal possible precursor charge
|
private |
The amount of PSM that will be used. the rest is filtered out.
|
private |
|
protected |
skip ions below this index (0=all, 2=skip b1/b2/y1/y2)
|
private |
Minimal possible isotope error.
|
private |
PSM with less hits are discarded.
|
protected |
Peptide-mass mode: smallest and largest shift (0 if no variable modification is configured)
|
private |
minimal possible precursor charge (usually always 1)
|
private |
number of missed cleavages
|
protected |
Peptide-mass mode: the sums of at most variable_max_per_peptide variable modification deltas (with protein-terminal ones), ascending, with 0 (set by updateMembers_())
|
protected |
|
private |
Modification that are one all peptides.
|
private |
Variable Modification -> all possible comibnations are created.
|
private |
|
private |
|
private |
|
private |
|
protected |
positive magnitude, effective lower bound is -lower
|
protected |
|
protected |
positive magnitude, effective upper bound is +upper
|
protected |
Protein lengths indexed by protein_idx, populated at build() time.
|
protected |
occurrences removed by peptide:deduplicate (getRemovedOccurrences())
|
staticprotected |
Precomputed residue mass lookup table: ASCII char -> internal monoisotopic mass (Da). Indexed by single-letter amino acid code (e.g., 'A'=65). Entries for non-AA chars are 0.
|
protected |
Peptide-mass mode: distinct sums Σ of the deltas of at most variable_max_per_peptide variable modifications, i.e. the shifts between the mass of a peptidoform and that of its unmodified peptide; always includes 0. Excludes protein-terminal variable modifications.
|
protected |
Peptide-mass mode: as sigma_delta_set_, with the PROTEIN_C_TERM variable modifications.
|
protected |
Peptide-mass mode: as sigma_delta_set_, with the PROTEIN_N_TERM variable modifications.
|
private |
|
staticconstexprprivate |
Skip tables of fi_fragments_ and electron_fragments_ for queryPeaks(): the peptide_idx_ of every SKIP_STRIDE_-th fragment of each bucket, skip_per_bucket_ entries per bucket.
|
protected |
Pure C-terminal variable mods (not residue-specific)
|
protected |
Per-AA variable modification table: for each ASCII char, list of possible variable mods.
|
protected |
Pure N-terminal variable mods (not residue-specific)
|
protected |
A nonempty subset of at most max_variable_mods_per_peptide_ variable modifications sums to Σ = 0 (within the Σ tolerance of the subset enumeration), so the prefixes found at Σ = 0 are expanded into subsets too