OpenMS
Loading...
Searching...
No Matches
NuXLSiteLocalization Class Reference

Localizes a cross-link by the chemistry of the cross-linker, within the residues the fragment ions support. More...

#include <OpenNuXL/include/NuXLSiteLocalization.h>

Classes

struct  ProteinTermini
 Protein N- and C-terminal peptides of a digest, sorted, to look them up with isProteinNTerminal and isProteinCTerminal. More...
 
struct  Site
 Result of localizing one cross-link. More...
 

Static Public Member Functions

static std::vector< int > supportedResidues (const std::vector< double > &n_shifts, const std::vector< double > &n_noshifts, const std::vector< double > &c_shifts, const std::vector< double > &c_noshifts, double tolerance=DEFAULT_TOLERANCE)
 Residues at which a cross-link explains the fragment ions best.
 
static Site localizeNHS (const std::string &sequence, bool reactive_protein_n_term, const std::vector< double > &n_shifts, const std::vector< double > &n_noshifts, const std::vector< double > &c_shifts, const std::vector< double > &c_noshifts, double tolerance=DEFAULT_TOLERANCE, const std::vector< bool > &blocked={})
 Localizes a cross-link attached through an NHS ester.
 
static void digestProtein (const EnzymaticDigestion &digestion, std::string_view protein, size_t min_length, size_t max_length, bool clip_nterm_methionine, std::vector< std::string_view > &peptides)
 The peptides of a protein as searched: its digest and, optionally, its N-terminal peptides after removal of the initial methionine.
 
static ProteinTermini proteinTermini (const std::vector< std::string_view > &proteins, const EnzymaticDigestion &digestion, size_t min_length, size_t max_length, bool clip_nterm_methionine)
 The protein-terminal peptides among the peptides digestProtein yields for proteins.
 
static bool isProteinNTerminal (const ProteinTermini &termini, std::string_view peptide)
 Whether peptide is a protein N-terminal digestion product (see proteinTermini)
 
static bool isProteinCTerminal (const ProteinTermini &termini, std::string_view peptide)
 Whether peptide is a protein C-terminal digestion product (see proteinTermini)
 

Static Public Attributes

static constexpr double DEFAULT_TOLERANCE = 0.1
 Default fraction of the fragment intensity by which a residue's support may fall short of the best and still count as supported.
 

Detailed Description

Localizes a cross-link by the chemistry of the cross-linker, within the residues the fragment ions support.

Used for cross-linkers that bind the protein through an NHS ester (e.g. SDA): these react with the protein N-terminus and lysines, and much less with serine, threonine and tyrosine (mainly next to a histidine, see Mädler et al., J. Mass Spectrom. 2009, 44, 694-706).

Localization works in two steps:

  1. supportedResidues determines the residues the fragment ions can't tell apart (the ambiguity stretch, like the lower-case range in the MSFragger localization).
  2. localizeNHS picks the site in that stretch by the NHS chemistry.

The fragment evidence is passed per residue, as summed intensities of the a/b- and y-ions: index i of n_shifts / n_noshifts is the prefix ion that ends at residue i (bi+1), index i of c_shifts / c_noshifts is the suffix ion that starts at residue i (ylength-i). "shifts" are ions carrying a cross-linker fragment adduct, "noshifts" ions without. All residue positions are 0-based.


Class Documentation

◆ OpenMS::NuXLSiteLocalization::ProteinTermini

struct OpenMS::NuXLSiteLocalization::ProteinTermini

Protein N- and C-terminal peptides of a digest, sorted, to look them up with isProteinNTerminal and isProteinCTerminal.

Class Members
vector< string > c_terminal peptides that end a protein
vector< string > n_terminal peptides that start a protein (also right behind a clipped initial methionine)

◆ OpenMS::NuXLSiteLocalization::Site

struct OpenMS::NuXLSiteLocalization::Site

Result of localizing one cross-link.

Class Members
string method = "unlocalized" how the site was chosen: "N-term", "K", "STY+H" or "unlocalized"
int position = -1 localized residue, -1 if unlocalized
int range_begin = -1 first residue supported by the fragment ions, -1 without fragment evidence
int range_end = -1 last residue supported by the fragment ions, -1 without fragment evidence

Member Function Documentation

◆ digestProtein()

void digestProtein ( const EnzymaticDigestion &  digestion,
std::string_view  protein,
size_t  min_length,
size_t  max_length,
bool  clip_nterm_methionine,
std::vector< std::string_view > &  peptides 
)
static

The peptides of a protein as searched: its digest and, optionally, its N-terminal peptides after removal of the initial methionine.

Parameters
[in]digestionthe enzyme and missed cleavages of the search
[in]proteinprotein sequence
[in]min_lengthminimum peptide length
[in]max_lengthmaximum peptide length (0: no limit)
[in]clip_nterm_methioninealso the N-terminal products of the protein without its initial methionine, if it starts with M
[out]peptidesviews into protein

References EnzymaticDigestion::digestUnmodified().

Referenced by NuXLSiteLocalization::proteinTermini().

◆ isProteinCTerminal()

bool isProteinCTerminal ( const ProteinTermini &  termini,
std::string_view  peptide 
)
static

Whether peptide is a protein C-terminal digestion product (see proteinTermini)

References NuXLSiteLocalization::ProteinTermini::c_terminal.

Referenced by NuXLAnnotateAndLocate::annotateAndLocate_().

◆ isProteinNTerminal()

bool isProteinNTerminal ( const ProteinTermini &  termini,
std::string_view  peptide 
)
static

Whether peptide is a protein N-terminal digestion product (see proteinTermini)

References NuXLSiteLocalization::ProteinTermini::n_terminal.

Referenced by NuXLAnnotateAndLocate::annotateAndLocate_().

◆ localizeNHS()

NuXLSiteLocalization::Site localizeNHS ( const std::string &  sequence,
bool  reactive_protein_n_term,
const std::vector< double > &  n_shifts,
const std::vector< double > &  n_noshifts,
const std::vector< double > &  c_shifts,
const std::vector< double > &  c_noshifts,
double  tolerance = DEFAULT_TOLERANCE,
const std::vector< bool > &  blocked = {} 
)
static

Localizes a cross-link attached through an NHS ester.

Among the supportedResidues, in this order:

  1. the peptide N-terminus, if reactive_protein_n_term (the peptide starts the protein and its N-terminus is free) and the first residue is supported;
  2. the lysine closest to the middle of the supported residues;
  3. the serine, threonine or tyrosine closest to the middle of the supported residues that has a histidine within four residues in the peptide;
  4. otherwise the cross-link stays unlocalized.

Ties go to the residue closer to the N-terminus. Residues flagged in blocked are skipped.

Parameters
[in]sequenceunmodified peptide sequence
[in]reactive_protein_n_termwhether the peptide N-terminus is the free N-terminus of a protein
[in]n_shiftsintensity of the shifted prefix (a/b) ions ending at each residue
[in]n_noshiftsintensity of the unshifted prefix (a/b) ions ending at each residue
[in]c_shiftsintensity of the shifted suffix (y) ions starting at each residue
[in]c_noshiftsintensity of the unshifted suffix (y) ions starting at each residue
[in]tolerancesee supportedResidues
[in]blockedper residue, whether a modification blocks its reactive group (e.g. an acetylated lysine); empty: none

References NuXLSiteLocalization::Site::method, NuXLSiteLocalization::Site::position, NuXLSiteLocalization::Site::range_begin, NuXLSiteLocalization::Site::range_end, and NuXLSiteLocalization::supportedResidues().

Referenced by NuXLAnnotateAndLocate::annotateAndLocate_().

◆ proteinTermini()

NuXLSiteLocalization::ProteinTermini proteinTermini ( const std::vector< std::string_view > &  proteins,
const EnzymaticDigestion &  digestion,
size_t  min_length,
size_t  max_length,
bool  clip_nterm_methionine 
)
static

The protein-terminal peptides among the peptides digestProtein yields for proteins.

Only digestion products count: a peptide that merely is a prefix or suffix of a protein, without being produced from its terminus, is not protein-terminal.

References NuXLSiteLocalization::ProteinTermini::c_terminal, NuXLSiteLocalization::digestProtein(), and NuXLSiteLocalization::ProteinTermini::n_terminal.

◆ supportedResidues()

vector< int > supportedResidues ( const std::vector< double > &  n_shifts,
const std::vector< double > &  n_noshifts,
const std::vector< double > &  c_shifts,
const std::vector< double > &  c_noshifts,
double  tolerance = DEFAULT_TOLERANCE 
)
static

Residues at which a cross-link explains the fragment ions best.

For every residue, sums the intensity of the ions consistent with a cross-link there (shifted ions that contain the residue, unshifted ions that don't) minus the intensity of the inconsistent ones. Returns the residues whose sum is at most tolerance times the total fragment intensity below the highest one, so that a single weak or misassigned ion doesn't decide. They are usually contiguous; contradicting ions can support residues on both sides of unsupported ones. Residues no ion separates get the same sum (e.g., the first two residues without a1/b1 and ylength-1 ions). Unshifted ions alone also limit the range. Unshifted a1/b1 ions are ignored: b1 of lysine coincides with common lysine ions of any peptide.

Parameters
[in]n_shiftsintensity of the shifted prefix (a/b) ions ending at each residue
[in]n_noshiftsintensity of the unshifted prefix (a/b) ions ending at each residue
[in]c_shiftsintensity of the shifted suffix (y) ions starting at each residue
[in]c_noshiftsintensity of the unshifted suffix (y) ions starting at each residue
[in]tolerancefraction of the total fragment intensity by which a residue's sum may fall short of the highest
Returns
supported residues (0-based, ascending); empty without any fragment evidence

Referenced by NuXLSiteLocalization::localizeNHS().

Member Data Documentation

◆ DEFAULT_TOLERANCE

constexpr double DEFAULT_TOLERANCE = 0.1
staticconstexpr

Default fraction of the fragment intensity by which a residue's support may fall short of the best and still count as supported.

Referenced by NuXLAnnotateAndLocate::annotateAndLocate_().