OpenMS
|
#include <OpenMS/CHEMISTRY/TheoreticalSpectrumGeneratorXLMS.h>
Classes | |
struct | LossIndex |
Constructors and Destructors | |
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_first_prefix_ion_ |
bool | add_losses_ |
bool | add_metainfo_ |
bool | add_charges_ |
bool | add_isotopes_ |
bool | add_precursor_peaks_ |
bool | add_abundant_immonium_ions_ |
double | a_intensity_ |
double | b_intensity_ |
double | c_intensity_ |
double | x_intensity_ |
double | y_intensity_ |
double | z_intensity_ |
Int | max_isotope_ |
double | rel_loss_intensity_ |
double | pre_int_ |
double | pre_int_H2O_ |
double | pre_int_NH3_ |
bool | add_k_linked_ions_ |
std::map< String, LossIndex > | loss_db_ |
double | loss_H2O_ = 0 |
double | loss_NH3_ = 0 |
TheoreticalSpectrumGeneratorXLMS () | |
default constructor More... | |
TheoreticalSpectrumGeneratorXLMS (const TheoreticalSpectrumGeneratorXLMS &source) | |
copy constructor More... | |
~TheoreticalSpectrumGeneratorXLMS () override | |
destructor More... | |
TheoreticalSpectrumGeneratorXLMS & | operator= (const TheoreticalSpectrumGeneratorXLMS &tsg) |
assignment operator More... | |
virtual void | getLinearIonSpectrum (PeakSpectrum &spectrum, AASequence &peptide, Size link_pos, bool frag_alpha, int charge=1, Size link_pos_2=0) const |
Generates fragment ions not containing the cross-linker for one peptide. More... | |
virtual void | getXLinkIonSpectrum (PeakSpectrum &spectrum, AASequence &peptide, Size link_pos, double precursor_mass, bool frag_alpha, int mincharge, int maxcharge, Size link_pos_2=0) const |
Generates fragment ions containing the cross-linker for one peptide. More... | |
virtual void | getXLinkIonSpectrum (PeakSpectrum &spectrum, OPXLDataStructs::ProteinProteinCrossLink &crosslink, bool frag_alpha, int mincharge, int maxcharge) const |
Generates fragment ions containing the cross-linker for a pair of peptides. More... | |
void | updateMembers_ () override |
overwrite More... | |
virtual void | addLinearPeaks_ (PeakSpectrum &spectrum, DataArrays::IntegerDataArray &charges, DataArrays::StringDataArray &ion_names, AASequence &peptide, Size link_pos, bool frag_alpha, Residue::ResidueType res_type, std::vector< LossIndex > &forward_losses, std::vector< LossIndex > &backward_losses, int charge=1, Size link_pos_2=0) const |
Adds cross-link-less ions of a specific ion type and charge to a spectrum and adds ion name and charge annotations to the DataArrays. More... | |
virtual void | addPeak_ (PeakSpectrum &spectrum, DataArrays::IntegerDataArray &charges, DataArrays::StringDataArray &ion_names, double pos, double intensity, Residue::ResidueType res_type, Size ion_index, int charge, String ion_type) const |
Adds a single peak to a spectrum and its charge and ion name to the given DataArrays. More... | |
virtual void | addPrecursorPeaks_ (PeakSpectrum &spectrum, DataArrays::IntegerDataArray &charges, DataArrays::StringDataArray &ion_names, double precursor_mass, int charge) const |
Adds precursor masses including neutral losses for the given charge and adds charge and ion name to the given DataArrays. More... | |
virtual void | addLinearIonLosses_ (PeakSpectrum &spectrum, DataArrays::IntegerDataArray &charges, DataArrays::StringDataArray &ion_names, double mono_weight, Residue::ResidueType res_type, Size frag_index, double intensity, int charge, String ion_type, LossIndex &losses) const |
Adds losses for a linear ion. More... | |
virtual void | addXLinkIonLosses_ (PeakSpectrum &spectrum, DataArrays::IntegerDataArray &charges, DataArrays::StringDataArray &ion_names, double mono_weight, double intensity, int charge, String ion_type, LossIndex &losses) const |
Adds losses for a cross-linked ion. More... | |
virtual void | addKLinkedIonPeaks_ (PeakSpectrum &spectrum, DataArrays::IntegerDataArray &charges, DataArrays::StringDataArray &ion_names, AASequence &peptide, Size link_pos, double precursor_mass, bool frag_alpha, int charge) const |
Adds one-residue-linked ion peaks, that are specific to XLMS. More... | |
virtual void | addXLinkIonPeaks_ (PeakSpectrum &spectrum, DataArrays::IntegerDataArray &charges, DataArrays::StringDataArray &ion_names, AASequence &peptide, Size link_pos, double precursor_mass, bool frag_alpha, Residue::ResidueType res_type, std::vector< LossIndex > &forward_losses, std::vector< LossIndex > &backward_losses, int charge, Size link_pos_2=0) const |
Adds cross-linked ions of a specific ion type and charge to a spectrum and adds ion name and charge annotations to the DataArrays. More... | |
virtual void | addXLinkIonPeaks_ (PeakSpectrum &spectrum, DataArrays::IntegerDataArray &charges, DataArrays::StringDataArray &ion_names, OPXLDataStructs::ProteinProteinCrossLink &crosslink, bool frag_alpha, Residue::ResidueType res_type, std::vector< LossIndex > &forward_losses, std::vector< LossIndex > &backward_losses, LossIndex &losses_peptide2, int charge) const |
Adds cross-linked ions of a specific ion type and charge to a spectrum and adds ion name and charge annotations to the DataArrays. More... | |
std::vector< LossIndex > | getForwardLosses_ (AASequence &peptide) const |
Calculates sets of possible neutral losses for each position in the given peptide. More... | |
std::vector< LossIndex > | getBackwardLosses_ (AASequence &peptide) const |
Calculates sets of possible neutral losses for each position in the given peptide. More... | |
Additional Inherited Members | |
Public Member Functions inherited from DefaultParamHandler | |
DefaultParamHandler (const String &name) | |
Constructor with name that is displayed in error messages. More... | |
DefaultParamHandler (const DefaultParamHandler &rhs) | |
Copy constructor. More... | |
virtual | ~DefaultParamHandler () |
Destructor. More... | |
DefaultParamHandler & | operator= (const DefaultParamHandler &rhs) |
Assignment operator. More... | |
virtual bool | operator== (const DefaultParamHandler &rhs) const |
Equality operator. More... | |
void | setParameters (const Param ¶m) |
Sets the parameters. More... | |
const Param & | getParameters () const |
Non-mutable access to the parameters. More... | |
const Param & | getDefaults () const |
Non-mutable access to the default parameters. More... | |
const String & | getName () const |
Non-mutable access to the name. More... | |
void | setName (const String &name) |
Mutable access to the name. More... | |
const std::vector< String > & | getSubsections () const |
Non-mutable access to the registered subsections. More... | |
Static Public Member Functions inherited from DefaultParamHandler | |
static void | writeParametersToMetaValues (const Param &write_this, MetaInfoInterface &write_here, const String &key_prefix="") |
Writes all parameters to meta values. More... | |
Protected Member Functions inherited from DefaultParamHandler | |
void | defaultsToParam_ () |
Updates the parameters after the defaults have been set in the constructor. More... | |
Protected Attributes inherited from DefaultParamHandler | |
Param | param_ |
Container for current parameters. More... | |
Param | defaults_ |
Container for default parameters. This member should be filled in the constructor of derived classes! More... | |
std::vector< String > | subsections_ |
Container for registered subsections. This member should be filled in the constructor of derived classes! More... | |
String | error_name_ |
Name that is displayed in error messages during the parameter checking. More... | |
bool | check_defaults_ |
If this member is set to false no checking if parameters in done;. More... | |
bool | warn_empty_defaults_ |
If this member is set to false no warning is emitted when defaults are empty;. More... | |
@brief Generates theoretical spectra for cross-linked peptides The spectra this class generates are instances of the PeakSpectrum class. This class generates the same peak types as SimpleTSGXLMS and the interface is very similar, but it is more complex and slower. If the parameters add_metainfo and add_charges are set to true, it will generate a StringDataArray for String annotations of ion types and an IntegerDataArray for peak charges and add them to the DataArrays of the produced PeakSpectrum. The spectra from this class are mainly used for annotation of matched experimental spectra.Parameters of this class are:
Name | Type | Default | Restrictions | Description |
---|---|---|---|---|
add_isotopes | string | false | true, false | If set to 1 isotope peaks of the product ion peaks are added |
max_isotope | int | 2 | Defines the maximal isotopic peak which is added, add_isotopes must be set to 1 | |
add_metainfo | string | true | true, false | Adds the type of peaks as metainfo to the peaks, like y8+, [M-H2O+2H]++ |
add_charges | string | true | true, false | Adds the charges to a DataArray of the spectrum |
add_losses | string | false | true, false | Adds common losses to those ion expect to have them, only water and ammonia loss is considered |
add_precursor_peaks | string | true | true, false | Adds peaks of the precursor to the spectrum, which happen to occur sometimes |
add_abundant_immonium_ions | string | false | true, false | Add most abundant immonium ions |
add_k_linked_ions | string | true | true, false | Add RES-Linked ions, which are specific to XLMS |
add_first_prefix_ion | string | true | true, false | If set to true e.g. b1 ions are added |
add_y_ions | string | true | true, false | Add peaks of y-ions to the spectrum |
add_b_ions | string | true | true, false | Add peaks of b-ions to the spectrum |
add_a_ions | string | true | true, false | Add peaks of a-ions to the spectrum |
add_c_ions | string | false | true, false | Add peaks of c-ions to the spectrum |
add_x_ions | string | false | true, false | Add peaks of x-ions to the spectrum |
add_z_ions | string | false | true, false | Add peaks of z-ions to the spectrum |
y_intensity | float | 1.0 | Intensity of the y-ions | |
b_intensity | float | 1.0 | Intensity of the b-ions | |
a_intensity | float | 1.0 | Intensity of the a-ions | |
c_intensity | float | 1.0 | Intensity of the c-ions | |
x_intensity | float | 1.0 | Intensity of the x-ions | |
z_intensity | float | 1.0 | Intensity of the z-ions | |
relative_loss_intensity | float | 0.1 | Intensity of loss ions, in relation to the intact ion intensity | |
precursor_intensity | float | 1.0 | Intensity of the precursor peak | |
precursor_H2O_intensity | float | 1.0 | Intensity of the H2O loss peak of the precursor | |
precursor_NH3_intensity | float | 1.0 | Intensity of the NH3 loss peak of the precursor |
@ingroup Chemistry
struct OpenMS::TheoreticalSpectrumGeneratorXLMS::LossIndex |
Class Members | ||
---|---|---|
bool | has_H2O_loss | |
bool | has_NH3_loss |
default constructor
TheoreticalSpectrumGeneratorXLMS | ( | const TheoreticalSpectrumGeneratorXLMS & | source | ) |
copy constructor
|
override |
destructor
|
protectedvirtual |
Adds one-residue-linked ion peaks, that are specific to XLMS.
These fragments consist of one whole peptide, the cross-linker and a part of the linked residue from the second peptide. The residue fragment on the linker is an internal ion from a y- and an a-fragmentation with the length of one residue. The function is called KLinked for now, but instead of K it is whatever the linker is attached to.
spectrum | The spectrum to which the peaks are added |
charges | A DataArray collecting the charges of the added peaks |
ion_names | A DataArray collecting the ion names of the added peaks |
peptide | The fragmented peptide |
link_pos | position of the linker on the fragmented peptide |
precursor_mass | The mass of the whole cross-link candidate or the precursor mass of the experimental MS2 spectrum. |
frag_alpha | True, if the fragmented peptide is the Alpha peptide. Used for ion-name annotation. |
charge | The charge of the ion |
|
protectedvirtual |
Adds losses for a linear ion.
spectrum | The spectrum to which the new peak is added |
charges | A DataArray collecting the charges of the added peaks |
ion_names | A DataArray collecting the ion names of the added peaks |
mono_weight | monoisotopic mass of the current ion |
res_type | The ion type of the current ion |
frag_index | The index of the ion (fragmentation position) |
intensity | |
charge | The charge of the ion |
ion_type | Another cross-linking specific ion-type |
losses | a set of LossMasses with which to modify the current ion |
|
protectedvirtual |
Adds cross-link-less ions of a specific ion type and charge to a spectrum and adds ion name and charge annotations to the DataArrays.
spectrum | The spectrum to which the new peaks are added. Does not have to be empty, the generated peaks will be pushed onto it. |
charges | A DataArray collecting the charges of the added peaks |
ion_names | A DataArray collecting the ion names of the added peaks |
peptide | The peptide to fragment |
link_pos | The position of the cross-linker on the given peptide |
frag_alpha | True, if the fragmented peptide is the Alpha peptide. Used for ion-name annotation. |
res_type | The ion type of the added peaks |
forward_losses | vector of sets of losses generated by getForwardLosses_ |
backward_losses | vector of sets of losses generated by getBackwardLosses_ |
charge | The charge of the added peaks |
link_pos_2 | A second position for the linker, in case it is a loop link |
|
protectedvirtual |
Adds a single peak to a spectrum and its charge and ion name to the given DataArrays.
The ion_type is a string in this form: "alpha|xi", the first word can be either "alpha" or "beta" and indicates the fragmented peptide, the two letters at the end are either "ci" or "xi" for linear ion or cross-linked ion.
spectrum | The spectrum to which the new peak is added |
charges | A DataArray collecting the charges of the added peaks |
ion_names | A DataArray collecting the ion names of the added peaks |
pos | |
intensity | |
res_type | The ion type of the added peak |
ion_index | The index of the ion (fragmentation position) |
charge | The charge of the ion |
ion_type | Another cross-linking specific ion-type |
|
protectedvirtual |
Adds precursor masses including neutral losses for the given charge and adds charge and ion name to the given DataArrays.
spectrum | The spectrum to which the peaks are added |
charges | A DataArray collecting the charges of the added peaks |
ion_names | A DataArray collecting the ion names of the added peaks |
precursor_mass | The mass of the uncharged precursor |
charge | The charge of the precursor |
|
protectedvirtual |
Adds losses for a cross-linked ion.
spectrum | The spectrum to which the new peak is added |
charges | A DataArray collecting the charges of the added peaks |
ion_names | A DataArray collecting the ion names of the added peaks |
mono_weight | monoisotopic mass of the current ion |
intensity | |
charge | The charge of the ion |
ion_type | Another cross-linking specific ion-type |
losses | a set of LossMasses with which to modify the current ion |
|
protectedvirtual |
Adds cross-linked ions of a specific ion type and charge to a spectrum and adds ion name and charge annotations to the DataArrays.
This version of the function is for mono-links and loop-links.
spectrum | The spectrum to which the new peaks are added. Does not have to be empty, the generated peaks will be pushed onto it. |
charges | A DataArray collecting the charges of the added peaks |
ion_names | A DataArray collecting the ion names of the added peaks |
peptide | The peptide to fragment |
link_pos | The position of the cross-linker on the given peptide |
precursor_mass | The mass of the whole cross-link candidate or the precursor mass of the experimental MS2 spectrum. |
frag_alpha | True, if the fragmented peptide is the Alpha peptide. Used for ion-name annotation. |
res_type | The ion type of the added peaks |
forward_losses | vector of sets of losses generated by getForwardLosses_ |
backward_losses | vector of sets of losses generated by getBackwardLosses_ |
charge | The charge of the added peaks |
link_pos_2 | A second position for the linker, in case it is a loop link |
|
protectedvirtual |
Adds cross-linked ions of a specific ion type and charge to a spectrum and adds ion name and charge annotations to the DataArrays.
This version of the function is for cross-linked peptide pairs.
spectrum | The spectrum to which the new peaks are added. Does not have to be empty, the generated peaks will be pushed onto it. |
charges | A DataArray collecting the charges of the added peaks |
ion_names | A DataArray collecting the ion names of the added peaks |
crosslink | The ProteinProteinCrossLink to be fragmented |
frag_alpha | True, if the fragmented peptide is the Alpha peptide. Used for ion-name annotation. |
res_type | The ion type of the added peaks |
forward_losses | vector of sets of losses generated by getForwardLosses_ for the fragmented peptide |
backward_losses | vector of sets of losses generated by getBackwardLosses_ for the fragmented peptide |
losses_peptide2 | set of losses for the second, not fragmented peptide, e.g. last set from getForwardLosses_ for the second peptide |
charge | The charge of the added peaks |
|
protected |
Calculates sets of possible neutral losses for each position in the given peptide.
This function generates a vector of sets. Each set contains the possible neutral losses for a specific suffix of the peptide.
peptide | The peptide or ion for which to collect possible losses |
|
protected |
Calculates sets of possible neutral losses for each position in the given peptide.
This function generates a vector of sets. Each set contains the possible neutral losses for a specific prefix of the peptide.
peptide | The peptide or ion for which to collect possible losses |
|
virtual |
Generates fragment ions not containing the cross-linker for one peptide.
B-ions are generated from the beginning of the peptide up to the first linked position, y-ions are generated from the second linked position up the end of the peptide. If link_pos_2 is 0, a mono-link or cross-link is assumed and the second position is the same as the first position. For a loop-link two different positions can be set and link_pos_2 must be larger than link_pos. The generated ion types and other additional settings are determined by the tool parameters.
spectrum | The spectrum to which the new peaks are added. Does not have to be empty, the generated peaks will be pushed onto it. |
peptide | The peptide to fragment |
link_pos | The position of the cross-linker on the given peptide |
frag_alpha | True, if the fragmented peptide is the Alpha peptide. Used for ion-name annotation. |
charge | The maximal charge of the ions |
link_pos_2 | A second position for the linker, in case it is a loop link |
|
virtual |
Generates fragment ions containing the cross-linker for one peptide.
B-ions are generated from the first linked position up to the end of the peptide, y-ions are generated from the beginning of the peptide up to the second linked position. If link_pos_2 is 0, a mono-link or cross-link is assumed and the second position is the same as the first position. For a loop-link two different positions can be set and link_pos_2 must be larger than link_pos. Since in the case of a cross-link a whole second peptide is attached to the other side of the cross-link, a precursor mass for the two peptides and the linker is needed. In the case of a loop link the precursor mass is the mass of the only peptide and the linker. Although this function is more general, currently it is mainly used for loop-links and mono-links, because residues in the second, unknown peptide cannot be considered for possible neutral losses. The generated ion types and other additional settings are determined by the tool parameters.
spectrum | The spectrum to which the new peaks are added. Does not have to be empty, the generated peaks will be pushed onto it. |
peptide | The peptide to fragment |
link_pos | The position of the cross-linker on the given peptide |
precursor_mass | The mass of the whole cross-link candidate or the precursor mass of the experimental MS2 spectrum. |
frag_alpha | True, if the fragmented peptide is the Alpha peptide. Used for ion-name annotation. |
mincharge | The minimal charge of the ions |
maxcharge | The maximal charge of the ions, it should be the precursor charge and is used to generate precursor ion peaks |
link_pos_2 | A second position for the linker, in case it is a loop link |
|
virtual |
Generates fragment ions containing the cross-linker for a pair of peptides.
B-ions are generated from the first linked position up to the end of the peptide, y-ions are generated from the beginning of the peptide up to the second linked position. This function generates neutral loss ions by considering both linked peptides. Only one of the peptides, decided by frag_alpha
, is fragmented. This function is not suitable to generate fragments for mono-links or loop-links. This simplifies the function, but it has to be called twice to get all fragments of a peptide pair. The generated ion types and other additional settings are determined by the tool parameters.
spectrum | The spectrum to which the new peaks are added. Does not have to be empty, the generated peaks will be pushed onto it. |
crosslink | ProteinProteinCrossLink to be fragmented |
frag_alpha | True, if the fragmented peptide is the Alpha peptide. |
mincharge | The minimal charge of the ions |
maxcharge | The maximal charge of the ions, it should be the precursor charge and is used to generate precursor ion peaks |
TheoreticalSpectrumGeneratorXLMS& operator= | ( | const TheoreticalSpectrumGeneratorXLMS & | tsg | ) |
assignment operator
|
overridevirtual |
overwrite
Reimplemented from DefaultParamHandler.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |