OpenMS
|
Calculate sequence tags from m/z values. More...
#include <OpenMS/CHEMISTRY/Tagger.h>
Public Member Functions | |
Tagger (size_t min_tag_length, double ppm, size_t max_tag_length=65535, size_t min_charge=1, size_t max_charge=1, const StringList &fixed_mods=StringList(), const StringList &var_mods=StringList()) | |
Constructor for Tagger. More... | |
void | getTag (const std::vector< double > &mzs, std::vector< std::string > &tags) const |
Generate tags from mass vector mzs . More... | |
void | getTag (const MSSpectrum &spec, std::vector< std::string > &tags) const |
Generate tags from an MSSpectrum. More... | |
void | setMaxCharge (size_t max_charge) |
Change the maximal charge considered by the tagger. More... | |
Private Member Functions | |
char | getAAByMass_ (double m) const |
get a residue one letter code by matching the mass m to the map of residues mass2aa_, returns ' ' if there is no match More... | |
void | getTag_ (std::string &tag, const std::vector< double > &mzs, const size_t i, std::vector< std::string > &tags, const size_t charge) const |
start searching for tags starting from peak i of the mz vector mzs More... | |
Private Attributes | |
double | min_gap_ |
will be set to smallest residue mass in ResidueDB More... | |
double | max_gap_ |
will be set to highest residue mass in ResidueDB More... | |
double | ppm_ |
tolerance More... | |
size_t | min_tag_length_ |
minimum tag length More... | |
size_t | max_tag_length_ |
maximum tag length More... | |
size_t | min_charge_ |
minimal fragment charge More... | |
size_t | max_charge_ |
maximal fragment charge More... | |
std::map< double, char > | mass2aa_ |
mapping of residue masses to their one letter codes More... | |
Calculate sequence tags from m/z values.
Current restrictions and potential extensions:
Tagger | ( | size_t | min_tag_length, |
double | ppm, | ||
size_t | max_tag_length = 65535 , |
||
size_t | min_charge = 1 , |
||
size_t | max_charge = 1 , |
||
const StringList & | fixed_mods = StringList() , |
||
const StringList & | var_mods = StringList() |
||
) |
Constructor for Tagger.
The parameter max_charge_
should be >= min_charge_
. Also max_tag_length
should be >= min_tag_length
.
min_tag_length | the minimal sequence tag length. |
ppm | the tolerance for matching residue masses to peak delta masses. |
max_tag_length | the maximal sequence tag length. |
min_charge | minimal fragment charge considered for each sequence tag. |
max_charge | maximal fragment charge considered for each sequence tag. |
fixed_mods | a list of modification names. The modified residues replace the unmodified versions. |
var_mods | a list of modification names. The modified residues are added as additional entries to the list of residues. |
|
private |
get a residue one letter code by matching the mass m
to the map of residues mass2aa_, returns ' ' if there is no match
void getTag | ( | const MSSpectrum & | spec, |
std::vector< std::string > & | tags | ||
) | const |
Generate tags from an MSSpectrum.
The parameter tags
is filled with one string per sequence tag. It uses the standard residues from ResidueDB including the fixed and variable modifications given to the constructor.
spec | a centroided fragment spectrum. |
tags | the vector of tags, that is filled with this function. |
void getTag | ( | const std::vector< double > & | mzs, |
std::vector< std::string > & | tags | ||
) | const |
Generate tags from mass vector mzs
.
The parameter tags
is filled with one string per sequence tag. It uses the standard residues from ResidueDB including the fixed and variable modifications given to the constructor.
mzs | a vector of mz values, containing the mz values from a centroided fragment spectrum. |
tags | the vector of tags, that is filled with this function. |
|
private |
start searching for tags starting from peak i
of the mz vector mzs
void setMaxCharge | ( | size_t | max_charge | ) |
Change the maximal charge considered by the tagger.
Allows to change the maximal considered charge e.g. based on a spectra precursor charge without calling the constructor multiple times.
max_charge | the new maximal charge. |
|
private |
mapping of residue masses to their one letter codes
|
private |
maximal fragment charge
|
private |
will be set to highest residue mass in ResidueDB
|
private |
maximum tag length
|
private |
minimal fragment charge
|
private |
will be set to smallest residue mass in ResidueDB
|
private |
minimum tag length
|
private |
tolerance