OpenMS
Loading...
Searching...
No Matches
ProSEAlgorithm::ProteinMapping_ Struct Reference

The protein occurrences of the sequences of a search's hits (peptide:protein_mapping = index). More...

#include <OpenMS/ANALYSIS/ID/PROSE/ProSEAlgorithm.h>

Public Member Functions

Size find (std::string_view sequence) const
 The entry of sequence, or sequences.size() if there is none.
 

Public Attributes

std::vector< std::string_view > sequences
 The unmodified hit sequences (views into the database), one entry each.
 
std::vector< std::vector< std::pair< UInt32, UInt32 > > > occurrences
 Per entry: its occurrences {protein index, position}, ascending (PeptideIndexing's evidence order)
 
std::vector< std::unordered_map< std::string_view, Size > > entries
 Sequence -> entry, in SHARDS hash tables.
 
std::string fallback_reason
 Why PeptideIndexing has to run instead; empty if the mapping applies.
 

Static Public Attributes

static constexpr Size SHARDS = 64
 Number of hash tables that sequences are spread over (by their hash), so that they are filled in parallel.
 

Detailed Description

The protein occurrences of the sequences of a search's hits (peptide:protein_mapping = index).

buildProteinMapping_() collects them while the fragment index exists, applyProteinMapping_() writes what PeptideIndexing::run() writes. PeptideIndexing (without mismatches and I/L equivalence; missed cleavages ignored; the initial methionine and the residue after it may be cleaved off) maps an unmodified hit sequence S to every (protein, position) at which S occurs, where up to aaa_max ambiguous residues (B, J, Z, X) of the protein may stand for residues of S, and isValidProduct() accepts the span. These are:

  1. the spans of the digest of the index with the residues S (FragmentIndex::getProteinOccurrences(), which includes the occurrences removed by peptide:deduplicate): they lie at enzymatic cleavage sites, have the missed cleavages, length and mass of S and no ambiguous residue;
  2. spans at position 1 or 2 of a protein that starts with M, which isValidProduct() takes as N-terminal;
  3. spans over 1 to aaa_max ambiguous residues, each one standing for a residue that AhoCorasickAmbiguous matches it with. The spans of 2. and 3. are checked with isValidProduct(). Configurations, databases and hits for which this does not reproduce PeptideIndexing exactly leave a reason (fallback_reason); then PeptideIndexing runs.

Member Function Documentation

◆ find()

Size find ( std::string_view  sequence) const
inline

The entry of sequence, or sequences.size() if there is none.

Member Data Documentation

◆ entries

std::vector<std::unordered_map<std::string_view, Size> > entries

Sequence -> entry, in SHARDS hash tables.

◆ fallback_reason

std::string fallback_reason

Why PeptideIndexing has to run instead; empty if the mapping applies.

◆ occurrences

std::vector<std::vector<std::pair<UInt32, UInt32> > > occurrences

Per entry: its occurrences {protein index, position}, ascending (PeptideIndexing's evidence order)

◆ sequences

std::vector<std::string_view> sequences

The unmodified hit sequences (views into the database), one entry each.

◆ SHARDS

constexpr Size SHARDS = 64
staticconstexpr

Number of hash tables that sequences are spread over (by their hash), so that they are filled in parallel.