CycloBranch
cTheoreticalSpectrum Class Reference

The class representing a theoretical mass spectrum. More...

#include <cTheoreticalSpectrum.h>

Public Member Functions

 cTheoreticalSpectrum ()
 The constructor.
 
 cTheoreticalSpectrum (cParameters *parameters, cCandidate &candidate)
 The constructor. More...
 
void clear (bool clearpeaklist=true)
 Clear the spectrum. More...
 
cCandidategetCandidate ()
 Get the peptide spectrum candidate. More...
 
void setCandidate (cCandidate &candidate)
 Set a peptide spectrum candidate. More...
 
int getNumberOfPeaks ()
 Get the number of peaks in the spectrum. More...
 
int compareBranched (cPeaksList &sortedpeaklist, cBricksDatabase &bricksdatabasewithcombinations, bool writedescription, regex &sequencetag, regex &searchedsequence, cPeaksList &unmatchedpeaksinmatchedpatterns, unordered_map< string, int > *isotopeformuladesctoid)
 Compare the theoretical spectrum of a branched peptide with an experimental spectrum. More...
 
int compareLinear (cPeaksList &sortedpeaklist, cBricksDatabase &bricksdatabasewithcombinations, bool writedescription, regex &sequencetag, regex &searchedsequence, cPeaksList &unmatchedpeaksinmatchedpatterns, unordered_map< string, int > *isotopeformuladesctoid)
 Compare the theoretical spectrum of a linear peptide with an experimental spectrum. More...
 
int compareCyclic (cPeaksList &sortedpeaklist, cBricksDatabase &bricksdatabasewithcombinations, bool writedescription, regex &sequencetag, regex &searchedsequence, cPeaksList &unmatchedpeaksinmatchedpatterns, unordered_map< string, int > *isotopeformuladesctoid)
 Compare the theoretical spectrum of a cyclic peptide with an experimental spectrum. More...
 
int compareBranchCyclic (cPeaksList &sortedpeaklist, cBricksDatabase &bricksdatabasewithcombinations, bool writedescription, regex &sequencetag, regex &searchedsequence, cPeaksList &unmatchedpeaksinmatchedpatterns, unordered_map< string, int > *isotopeformuladesctoid)
 Compare the theoretical spectrum of a branch-cyclic peptide with an experimental spectrum. More...
 
int compareLinearPolyketide (cPeaksList &sortedpeaklist, cBricksDatabase &bricksdatabasewithcombinations, bool writedescription, regex &sequencetag, regex &searchedsequence, cPeaksList &unmatchedpeaksinmatchedpatterns, unordered_map< string, int > *isotopeformuladesctoid)
 Compare the theoretical spectrum of a linear polyketide with an experimental spectrum. More...
 
int compareCyclicPolyketide (cPeaksList &sortedpeaklist, cBricksDatabase &bricksdatabasewithcombinations, bool writedescription, regex &sequencetag, regex &searchedsequence, cPeaksList &unmatchedpeaksinmatchedpatterns, unordered_map< string, int > *isotopeformuladesctoid)
 Compare the theoretical spectrum of a cyclic polyketide with an experimental spectrum. More...
 
int compareOther (cPeaksList &sortedpeaklist, bool writedescription, cPeaksList &unmatchedpeaksinmatchedpatterns, unordered_map< string, int > *isotopeformuladesctoid)
 Compare the theoretical spectrum of a metabolite with an experimental spectrum. More...
 
void generateMSSpectrum (int sequencestart, int sequencestop, bool &terminatecomputation, bool writedescription)
 Generate a simple mass spectrum. More...
 
void generateFineMSSpectrum (int sequencestart, int sequencestop, bool &terminatecomputation)
 Generate a simple mass spectrum with fine isotopic patterns. More...
 
void getHintsIndex (int id, int peaklistseriesvectorid, cTheoreticalSpectrum &tsfull, cPeaksList &unmatchedpeaksinmatchedpatterns, vector< vector< int > > &hintsindex, bool lcmsrt, bool skipcomparison)
 Get a map of search hints to identify features in LC-MS data. More...
 
void compareMSSpectrum (int id, int peaklistseriesvectorid, cTheoreticalSpectrum &tsfull, cPeaksList &unmatchedpeaksinmatchedpatterns, vector< vector< int > > &hintsindex, bool lcmsrt, bool skipcomparison)
 Compare theoretical peaks with an experimental spectrum. More...
 
void compareAverageMSSpectrum (cPeaksList &averagespectrum, cTheoreticalSpectrum &tsfull, cPeaksList &unmatchedpeaksinmatchedpatterns)
 Compare theoretical peaks with an average spectrum. More...
 
void finalizeMSSpectrum (cPeaksList &unmatchedpeaksinmatchedpatterns, bool writedescription)
 Finalize MS spectrum after comparison. More...
 
int getNumberOfMatchedPeaks () const
 Get the number of matched peaks between an experimental and a theoretical spectrum. More...
 
int getNumberOfScrambledPeaks ()
 Get the number of matched scrambled peaks between an experimental and a theoretical spectrum. More...
 
int getNumberOfMatchedPeaks (eFragmentIonType iontype, int neutrallosstype) const
 Get the number of matched peaks between an experimental and a theoretical spectrum of a specified fragment ion type. More...
 
int getNumberOfMatchedPeaksB () const
 Get the number of matched B ions between an experimental and a theoretical spectrum. More...
 
int getNumberOfMatchedPeaksY () const
 Get the number of matched Y ions between an experimental and a theoretical spectrum. More...
 
int getNumberOfMatchedPeaksYB () const
 Get the number of matched Y and B ions between an experimental and a theoretical spectrum. More...
 
double getRatioOfMatchedPeaks ()
 Get a ratio of matched peaks. More...
 
double getWeightedRatioOfMatchedPeaks () const
 Get weighted ratio of matched peaks. More...
 
double getCosineSimilarity () const
 Get cosine similarity. More...
 
void generateNTerminalFragmentIons (int maxcharge, int &peaklistrealsize, vector< int > &intcomposition, eFragmentIonType fragmentiontype, int neutrallosstype, cBricksDatabase &bricksdatabase, bool writedescription, int rotationid, vector< splitSite > &splittingsites, vector< cFragmentIonType > &searchedmodifications, ePeptideType peptidetype, bool regularblocksorder, TRotationInfo *trotation=0, eResidueLossType leftresiduelosstype=h2o_loss, bool hasfirstblockartificial=false)
 Generate a N-terminal fragment ion series. More...
 
void generateCTerminalFragmentIons (int maxcharge, int &peaklistrealsize, vector< int > &intcomposition, eFragmentIonType fragmentiontype, int neutrallosstype, cBricksDatabase &bricksdatabase, bool writedescription, int rotationid, vector< splitSite > &splittingsites, vector< cFragmentIonType > &searchedmodifications, ePeptideType peptidetype, bool regularblocksorder, TRotationInfo *trotation=0, eResidueLossType rightresiduelosstype=h2o_loss, bool haslastblockartificial=false)
 Generate a C-terminal fragment ion series. More...
 
void sortByMass (int limit=-1)
 Sort peaks by mass. More...
 
void resizePeakList (int size)
 Resize the list of peaks. More...
 
double getSumOfRelativeIntensities () const
 Get the sum of relative intensities of matched peaks. More...
 
cPeakoperator[] (int position)
 Overloaded operator []. More...
 
cPeaksListgetExperimentalSpectrum ()
 Get an experimental spectrum which has been compared with the theoretical spectrum. More...
 
void setExperimentalSpectrum (cPeaksList &experimentalspectrum)
 Set the experimental spectrum. More...
 
set< int > & getExperimentalMatches (int peakid)
 Get ids of theoretical peaks which hit an experimental peak. More...
 
string getCoverageBySeries ()
 Get coverage of series of fragment ions. More...
 
int getUnmatchedExperimentalPeaksCount ()
 Get the number of unmatched experimental peaks. More...
 
cPeaksListgetTheoreticalPeaks ()
 Get a list of theoretical peaks. More...
 
bool isValid ()
 Check if the candidate sequence corresponds to the searched sequence. More...
 
int getValidPosition ()
 Get a position of a rotation of a cyclic peptide sequence corresponding to searched sequence. More...
 
int getReverseValidPosition ()
 Get a reverted position of a rotation of a cyclic peptide sequence corresponding to searched sequence. More...
 
void setValidSequence (regex &searchedsequence)
 Set a flag determining if the candidate sequence corresponds to the searched sequence. More...
 
vector< string > & getLabelsOfRotations ()
 Get the labels of cyclic rotations. More...
 
int getNumberOfCompletedSeries ()
 Get a number of series which identify the peptide. More...
 
void setNumberOfCompletedSeries (int numberofcompletedseries)
 Set a number of series which identify the peptide. More...
 
void setPathId (int pathid)
 Set path id. More...
 
int getPathId () const
 Get path id. More...
 
void setParameters (cParameters *parameters)
 Set a pointer to the parameters of the application. More...
 
double getTargetPatternScore (int groupid)
 Get target pattern score. More...
 
double getTargetPatternFDR (int groupid)
 Get target pattern FDR. More...
 
map< int, double > & getTargetScores ()
 Get map of target scores. More...
 
map< int, double > & getDecoyScores ()
 Get map of decoy scores. More...
 
void setFDRs (vector< double > &targetscoresvector, vector< double > &fdrs, cPeaksList &unmatchedpeaksinmatchedpatterns)
 Set false discovery rates to peak groups. More...
 
void store (ofstream &os)
 Store the structure into an output stream. More...
 
void load (ifstream &is, int fileversionpart1, int fileversionpart2, int fileversionpart3)
 Load the structure from an input stream. More...
 
bool equals (cTheoreticalSpectrum &secondtheoreticalspectrum)
 Check if the object equals to another object. More...
 
void attach (cTheoreticalSpectrum &secondtheoreticalspectrum)
 Attach another spectrum. More...
 

Detailed Description

The class representing a theoretical mass spectrum.

Constructor & Destructor Documentation

◆ cTheoreticalSpectrum()

cTheoreticalSpectrum::cTheoreticalSpectrum ( cParameters parameters,
cCandidate candidate 
)

The constructor.

Parameters
parametersa pointer to the parameters of the application
candidatereference to a peptide sequence candidate

Member Function Documentation

◆ attach()

void cTheoreticalSpectrum::attach ( cTheoreticalSpectrum secondtheoreticalspectrum)

Attach another spectrum.

Parameters
secondtheoreticalspectrumspectrum to be attached

◆ clear()

void cTheoreticalSpectrum::clear ( bool  clearpeaklist = true)

Clear the spectrum.

Parameters
clearpeaklistif true then all variables including the list of theoretical peaks are cleared else the list of theoretical peaks is not cleared

◆ compareAverageMSSpectrum()

void cTheoreticalSpectrum::compareAverageMSSpectrum ( cPeaksList averagespectrum,
cTheoreticalSpectrum tsfull,
cPeaksList unmatchedpeaksinmatchedpatterns 
)

Compare theoretical peaks with an average spectrum.

Parameters
averagespectrumaverage experimental spectrum
tsfulltheoretical spectrum with descriptions of peaks
unmatchedpeaksinmatchedpatternsunmatched peaks in matched isotope patterns

◆ compareBranchCyclic()

int cTheoreticalSpectrum::compareBranchCyclic ( cPeaksList sortedpeaklist,
cBricksDatabase bricksdatabasewithcombinations,
bool  writedescription,
regex &  sequencetag,
regex &  searchedsequence,
cPeaksList unmatchedpeaksinmatchedpatterns,
unordered_map< string, int > *  isotopeformuladesctoid 
)

Compare the theoretical spectrum of a branch-cyclic peptide with an experimental spectrum.

Parameters
sortedpeaklistreference to an experimental peaklist
bricksdatabasewithcombinationsreference to a database of bricks with combinations of bricks
writedescriptionif true then string descriptions of peaks are filled
sequencetagreference to a regex of a sequence tag
searchedsequencereference to a regex of a searched sequence
unmatchedpeaksinmatchedpatternsunmatched peaks in matched isotope patterns
isotopeformuladesctoida map of isotope descriptions
Return values
intnumber theoretical peaks generated; -2 when the sequence tag does not match the peptide sequence candidate

◆ compareBranched()

int cTheoreticalSpectrum::compareBranched ( cPeaksList sortedpeaklist,
cBricksDatabase bricksdatabasewithcombinations,
bool  writedescription,
regex &  sequencetag,
regex &  searchedsequence,
cPeaksList unmatchedpeaksinmatchedpatterns,
unordered_map< string, int > *  isotopeformuladesctoid 
)

Compare the theoretical spectrum of a branched peptide with an experimental spectrum.

Parameters
sortedpeaklistreference to an experimental peaklist
bricksdatabasewithcombinationsreference to a database of bricks with combinations of bricks
writedescriptionif true then string descriptions of peaks are filled
sequencetagreference to a regex of a sequence tag
searchedsequencereference to a regex of a searched sequence
unmatchedpeaksinmatchedpatternsunmatched peaks in matched isotope patterns
isotopeformuladesctoida map of isotope descriptions
Return values
intnumber theoretical peaks generated; -2 when the sequence tag does not match the peptide sequence candidate

◆ compareCyclic()

int cTheoreticalSpectrum::compareCyclic ( cPeaksList sortedpeaklist,
cBricksDatabase bricksdatabasewithcombinations,
bool  writedescription,
regex &  sequencetag,
regex &  searchedsequence,
cPeaksList unmatchedpeaksinmatchedpatterns,
unordered_map< string, int > *  isotopeformuladesctoid 
)

Compare the theoretical spectrum of a cyclic peptide with an experimental spectrum.

Parameters
sortedpeaklistreference to an experimental peaklist
bricksdatabasewithcombinationsreference to a database of bricks with combinations of bricks
writedescriptionif true then string descriptions of peaks are filled
sequencetagreference to a regex of a sequence tag
searchedsequencereference to a regex of a searched sequence
unmatchedpeaksinmatchedpatternsunmatched peaks in matched isotope patterns
isotopeformuladesctoida map of isotope descriptions
Return values
intnumber theoretical peaks generated; -2 when the sequence tag does not match the peptide sequence candidate

◆ compareCyclicPolyketide()

int cTheoreticalSpectrum::compareCyclicPolyketide ( cPeaksList sortedpeaklist,
cBricksDatabase bricksdatabasewithcombinations,
bool  writedescription,
regex &  sequencetag,
regex &  searchedsequence,
cPeaksList unmatchedpeaksinmatchedpatterns,
unordered_map< string, int > *  isotopeformuladesctoid 
)

Compare the theoretical spectrum of a cyclic polyketide with an experimental spectrum.

Parameters
sortedpeaklistreference to an experimental peaklist
bricksdatabasewithcombinationsreference to a database of bricks with combinations of bricks
writedescriptionif true then string descriptions of peaks are filled
sequencetagreference to a regex of a sequence tag
searchedsequencereference to a regex of a searched sequence
unmatchedpeaksinmatchedpatternsunmatched peaks in matched isotope patterns
isotopeformuladesctoida map of isotope descriptions
Return values
intnumber theoretical peaks generated; -2 when the sequence tag does not match the peptide sequence candidate

◆ compareLinear()

int cTheoreticalSpectrum::compareLinear ( cPeaksList sortedpeaklist,
cBricksDatabase bricksdatabasewithcombinations,
bool  writedescription,
regex &  sequencetag,
regex &  searchedsequence,
cPeaksList unmatchedpeaksinmatchedpatterns,
unordered_map< string, int > *  isotopeformuladesctoid 
)

Compare the theoretical spectrum of a linear peptide with an experimental spectrum.

Parameters
sortedpeaklistreference to an experimental peaklist
bricksdatabasewithcombinationsreference to a database of bricks with combinations of bricks
writedescriptionif true then string descriptions of peaks are filled
sequencetagreference to a regex of a sequence tag
searchedsequencereference to a regex of a searched sequence
unmatchedpeaksinmatchedpatternsunmatched peaks in matched isotope patterns
isotopeformuladesctoida map of isotope descriptions
Return values
intnumber theoretical peaks generated; -2 when the sequence tag does not match the peptide sequence candidate

◆ compareLinearPolyketide()

int cTheoreticalSpectrum::compareLinearPolyketide ( cPeaksList sortedpeaklist,
cBricksDatabase bricksdatabasewithcombinations,
bool  writedescription,
regex &  sequencetag,
regex &  searchedsequence,
cPeaksList unmatchedpeaksinmatchedpatterns,
unordered_map< string, int > *  isotopeformuladesctoid 
)

Compare the theoretical spectrum of a linear polyketide with an experimental spectrum.

Parameters
sortedpeaklistreference to an experimental peaklist
bricksdatabasewithcombinationsreference to a database of bricks with combinations of bricks
writedescriptionif true then string descriptions of peaks are filled
sequencetagreference to a regex of a sequence tag
searchedsequencereference to a regex of a searched sequence
unmatchedpeaksinmatchedpatternsunmatched peaks in matched isotope patterns
isotopeformuladesctoida map of isotope descriptions
Return values
intnumber theoretical peaks generated; -2 when the sequence tag does not match the peptide sequence candidate

◆ compareMSSpectrum()

void cTheoreticalSpectrum::compareMSSpectrum ( int  id,
int  peaklistseriesvectorid,
cTheoreticalSpectrum tsfull,
cPeaksList unmatchedpeaksinmatchedpatterns,
vector< vector< int > > &  hintsindex,
bool  lcmsrt,
bool  skipcomparison 
)

Compare theoretical peaks with an experimental spectrum.

Parameters
ididentifier of an experimental spectrum
peaklistseriesvectoridid of a peaklistseriesvector
tsfulltheoretical spectrum with descriptions of peaks
unmatchedpeaksinmatchedpatternsunmatched peaks in matched isotope patterns
hintsindexindex of experimental spectra for every matched theoretical peak
lcmsrttrue if LC-MS data are processed and retention time is available
skipcomparisonif true, the peak comparison is skipped

◆ compareOther()

int cTheoreticalSpectrum::compareOther ( cPeaksList sortedpeaklist,
bool  writedescription,
cPeaksList unmatchedpeaksinmatchedpatterns,
unordered_map< string, int > *  isotopeformuladesctoid 
)

Compare the theoretical spectrum of a metabolite with an experimental spectrum.

Parameters
sortedpeaklistreference to an experimental peaklist
writedescriptionif true then string descriptions of peaks are filled
unmatchedpeaksinmatchedpatternsunmatched peaks in matched isotope patterns
isotopeformuladesctoida map of isotope descriptions
Return values
intnumber theoretical peaks generated

◆ equals()

bool cTheoreticalSpectrum::equals ( cTheoreticalSpectrum secondtheoreticalspectrum)

Check if the object equals to another object.

Parameters
secondtheoreticalspectrumobject for comparison
Return values
booltrue if the objects are equals

◆ finalizeMSSpectrum()

void cTheoreticalSpectrum::finalizeMSSpectrum ( cPeaksList unmatchedpeaksinmatchedpatterns,
bool  writedescription 
)

Finalize MS spectrum after comparison.

Parameters
unmatchedpeaksinmatchedpatternsunmatched peaks in matched isotope patterns
writedescriptionif true then string descriptions of fragment ions are generated

◆ generateCTerminalFragmentIons()

void cTheoreticalSpectrum::generateCTerminalFragmentIons ( int  maxcharge,
int &  peaklistrealsize,
vector< int > &  intcomposition,
eFragmentIonType  fragmentiontype,
int  neutrallosstype,
cBricksDatabase bricksdatabase,
bool  writedescription,
int  rotationid,
vector< splitSite > &  splittingsites,
vector< cFragmentIonType > &  searchedmodifications,
ePeptideType  peptidetype,
bool  regularblocksorder,
TRotationInfo trotation = 0,
eResidueLossType  rightresiduelosstype = h2o_loss,
bool  haslastblockartificial = false 
)

Generate a C-terminal fragment ion series.

Parameters
maxchargea charge of precursor ion
peaklistrealsizereal size of the peak list
intcompositionreference to a vector of ids of bricks as integers
fragmentiontypefragment ion type to be generated
neutrallosstypeneutral loss type to be generated
bricksdatabasereference to a database of building blocks
writedescriptionif true then string descriptions of fragment ions are generated
rotationidid of a cyclic peptide
splittingsitesreference to a vector of splitting sites of a cyclic peptide
searchedmodificationsreference to a vector of searched modifications
peptidetypethe type of searched peptide
regularblocksordercheck regular order of ketide blocks
trotationa pointer to a T-permutation of a branched peptide
rightresiduelosstypea residue type of the rightmost building block
haslastblockartificialtrue when the last block is artificial, false otherwise

◆ generateFineMSSpectrum()

void cTheoreticalSpectrum::generateFineMSSpectrum ( int  sequencestart,
int  sequencestop,
bool &  terminatecomputation 
)

Generate a simple mass spectrum with fine isotopic patterns.

Parameters
sequencestartindex of the first item to be processed
sequencestopindex of the last item to be processed (excluding the last item)
terminatecomputationreference to a variable determining that the computation must be stopped

◆ generateMSSpectrum()

void cTheoreticalSpectrum::generateMSSpectrum ( int  sequencestart,
int  sequencestop,
bool &  terminatecomputation,
bool  writedescription 
)

Generate a simple mass spectrum.

Parameters
sequencestartindex of the first item to be processed
sequencestopindex of the last item to be processed (excluding the last item)
terminatecomputationreference to a variable determining that the computation must be stopped
writedescriptionif true then string descriptions of peaks are filled

◆ generateNTerminalFragmentIons()

void cTheoreticalSpectrum::generateNTerminalFragmentIons ( int  maxcharge,
int &  peaklistrealsize,
vector< int > &  intcomposition,
eFragmentIonType  fragmentiontype,
int  neutrallosstype,
cBricksDatabase bricksdatabase,
bool  writedescription,
int  rotationid,
vector< splitSite > &  splittingsites,
vector< cFragmentIonType > &  searchedmodifications,
ePeptideType  peptidetype,
bool  regularblocksorder,
TRotationInfo trotation = 0,
eResidueLossType  leftresiduelosstype = h2o_loss,
bool  hasfirstblockartificial = false 
)

Generate a N-terminal fragment ion series.

Parameters
maxchargea charge of precursor ion
peaklistrealsizereal size of the peak list
intcompositionreference to a vector of ids of bricks as integers
fragmentiontypefragment ion type to be generated
neutrallosstypeneutral loss type to be generated
bricksdatabasereference to a database of building blocks
writedescriptionif true then string descriptions of fragment ions are generated
rotationidid of a cyclic peptide
splittingsitesreference to a vector of splitting sites of a cyclic peptide
searchedmodificationsreference to a vector of searched modifications
peptidetypethe type of searched peptide
regularblocksordercheck regular order of ketide blocks
trotationa pointer to a T-permutation of a branched peptide
leftresiduelosstypea residue type of the leftmost building block
hasfirstblockartificialtrue when the first block is artificial, false otherwise

◆ getCandidate()

cCandidate & cTheoreticalSpectrum::getCandidate ( )

Get the peptide spectrum candidate.

Return values
cCandidatereference to the peptide sequence candidate

◆ getCosineSimilarity()

double cTheoreticalSpectrum::getCosineSimilarity ( ) const

Get cosine similarity.

Return values
doublecosine similarity

◆ getCoverageBySeries()

string cTheoreticalSpectrum::getCoverageBySeries ( )

Get coverage of series of fragment ions.

Return values
stringcoverage of the series of fragment ions

◆ getDecoyScores()

map< int, double > & cTheoreticalSpectrum::getDecoyScores ( )

Get map of decoy scores.

Return values
map<int,double>map of decoy scores

◆ getExperimentalMatches()

set< int > & cTheoreticalSpectrum::getExperimentalMatches ( int  peakid)

Get ids of theoretical peaks which hit an experimental peak.

Return values
set<int>set of ids of theoretical peaks

◆ getExperimentalSpectrum()

cPeaksList & cTheoreticalSpectrum::getExperimentalSpectrum ( )

Get an experimental spectrum which has been compared with the theoretical spectrum.

Return values
cPeaksListreference to an experimental spectrum

◆ getHintsIndex()

void cTheoreticalSpectrum::getHintsIndex ( int  id,
int  peaklistseriesvectorid,
cTheoreticalSpectrum tsfull,
cPeaksList unmatchedpeaksinmatchedpatterns,
vector< vector< int > > &  hintsindex,
bool  lcmsrt,
bool  skipcomparison 
)

Get a map of search hints to identify features in LC-MS data.

Parameters
ididentifier of an experimental spectrum
peaklistseriesvectoridid of a peaklistseriesvector
tsfulltheoretical spectrum
unmatchedpeaksinmatchedpatternsunmatched peaks in matched isotope patterns
hintsindexindex of experimental spectra for every matched theoretical peak
lcmsrttrue if LC-MS data are processed and retention time is available
skipcomparisonif true, the peak comparison is skipped

◆ getLabelsOfRotations()

vector< string > & cTheoreticalSpectrum::getLabelsOfRotations ( )

Get the labels of cyclic rotations.

Return values
vector<string>a vector of labels

◆ getNumberOfCompletedSeries()

int cTheoreticalSpectrum::getNumberOfCompletedSeries ( )

Get a number of series which identify the peptide.

Return values
intnumber of completed series

◆ getNumberOfMatchedPeaks() [1/2]

int cTheoreticalSpectrum::getNumberOfMatchedPeaks ( ) const

Get the number of matched peaks between an experimental and a theoretical spectrum.

Return values
intnumber of matched peaks

◆ getNumberOfMatchedPeaks() [2/2]

int cTheoreticalSpectrum::getNumberOfMatchedPeaks ( eFragmentIonType  iontype,
int  neutrallosstype 
) const

Get the number of matched peaks between an experimental and a theoretical spectrum of a specified fragment ion type.

Parameters
iontypea fragment ion type
neutrallosstypea neutral loss type
Return values
intnumber of matched peaks

◆ getNumberOfMatchedPeaksB()

int cTheoreticalSpectrum::getNumberOfMatchedPeaksB ( ) const

Get the number of matched B ions between an experimental and a theoretical spectrum.

Return values
intnumber of matched peaks

◆ getNumberOfMatchedPeaksY()

int cTheoreticalSpectrum::getNumberOfMatchedPeaksY ( ) const

Get the number of matched Y ions between an experimental and a theoretical spectrum.

Return values
intnumber of matched peaks

◆ getNumberOfMatchedPeaksYB()

int cTheoreticalSpectrum::getNumberOfMatchedPeaksYB ( ) const

Get the number of matched Y and B ions between an experimental and a theoretical spectrum.

Return values
intnumber of matched peaks

◆ getNumberOfPeaks()

int cTheoreticalSpectrum::getNumberOfPeaks ( )

Get the number of peaks in the spectrum.

Return values
intthe number of peaks

◆ getNumberOfScrambledPeaks()

int cTheoreticalSpectrum::getNumberOfScrambledPeaks ( )

Get the number of matched scrambled peaks between an experimental and a theoretical spectrum.

Return values
intnumber of matched scrambled peaks

◆ getPathId()

int cTheoreticalSpectrum::getPathId ( ) const

Get path id.

Return values
intid of a path

◆ getRatioOfMatchedPeaks()

double cTheoreticalSpectrum::getRatioOfMatchedPeaks ( )

Get a ratio of matched peaks.

Return values
doubleratio of matched peaks

◆ getReverseValidPosition()

int cTheoreticalSpectrum::getReverseValidPosition ( )

Get a reverted position of a rotation of a cyclic peptide sequence corresponding to searched sequence.

Return values
intreverted position of sequence

◆ getSumOfRelativeIntensities()

double cTheoreticalSpectrum::getSumOfRelativeIntensities ( ) const

Get the sum of relative intensities of matched peaks.

Return values
doublesum of relative intensities of matched peaks

◆ getTargetPatternFDR()

double cTheoreticalSpectrum::getTargetPatternFDR ( int  groupid)

Get target pattern FDR.

Parameters
groupidid of a group of peaks forming a target pattern
Return values
doubletarget pattern FDR

◆ getTargetPatternScore()

double cTheoreticalSpectrum::getTargetPatternScore ( int  groupid)

Get target pattern score.

Parameters
groupidid of a group of peaks forming a target pattern
Return values
doubletarget pattern score

◆ getTargetScores()

map< int, double > & cTheoreticalSpectrum::getTargetScores ( )

Get map of target scores.

Return values
map<int,double>map of target scores

◆ getTheoreticalPeaks()

cPeaksList * cTheoreticalSpectrum::getTheoreticalPeaks ( )

Get a list of theoretical peaks.

Return values
cPeaksLista pointer to a list of theoretical peaks

◆ getUnmatchedExperimentalPeaksCount()

int cTheoreticalSpectrum::getUnmatchedExperimentalPeaksCount ( )

Get the number of unmatched experimental peaks.

Return values
numberof unmatched experimental peaks

◆ getValidPosition()

int cTheoreticalSpectrum::getValidPosition ( )

Get a position of a rotation of a cyclic peptide sequence corresponding to searched sequence.

Return values
intposition of sequence

◆ getWeightedRatioOfMatchedPeaks()

double cTheoreticalSpectrum::getWeightedRatioOfMatchedPeaks ( ) const

Get weighted ratio of matched peaks.

Return values
doubleweighted ratio of matched peaks

◆ isValid()

bool cTheoreticalSpectrum::isValid ( )

Check if the candidate sequence corresponds to the searched sequence.

Return values
boolif true then the theoretical spectrum corresponds to a searched sequence

◆ load()

void cTheoreticalSpectrum::load ( ifstream &  is,
int  fileversionpart1,
int  fileversionpart2,
int  fileversionpart3 
)

Load the structure from an input stream.

Parameters
isan input stream
fileversionpart1first number of .res the file version
fileversionpart2second number of .res the file version
fileversionpart3third number of .res the file version

◆ operator[]()

cPeak & cTheoreticalSpectrum::operator[] ( int  position)

Overloaded operator [].

Parameters
positionposition of a peak in the peak list
Return values
cPeakreference to the peak

◆ resizePeakList()

void cTheoreticalSpectrum::resizePeakList ( int  size)

Resize the list of peaks.

Parameters
sizethe number of peaks

◆ setCandidate()

void cTheoreticalSpectrum::setCandidate ( cCandidate candidate)

Set a peptide spectrum candidate.

Parameters
candidatereference to the peptide sequence candidate

◆ setExperimentalSpectrum()

void cTheoreticalSpectrum::setExperimentalSpectrum ( cPeaksList experimentalspectrum)

Set the experimental spectrum.

Parameters
experimentalspectruman experimental spectrum

◆ setFDRs()

void cTheoreticalSpectrum::setFDRs ( vector< double > &  targetscoresvector,
vector< double > &  fdrs,
cPeaksList unmatchedpeaksinmatchedpatterns 
)

Set false discovery rates to peak groups.

Parameters
targetscoresvectorvector of target scores
fdrsvector of FDRs
unmatchedpeaksinmatchedpatternsunmatched peaks in matched isotope patterns

◆ setNumberOfCompletedSeries()

void cTheoreticalSpectrum::setNumberOfCompletedSeries ( int  numberofcompletedseries)

Set a number of series which identify the peptide.

Parameters
numberofcompletedseriesnumber of completed series

◆ setParameters()

void cTheoreticalSpectrum::setParameters ( cParameters parameters)

Set a pointer to the parameters of the application.

Parameters
parametersthe pointer to the parameters of the application

◆ setPathId()

void cTheoreticalSpectrum::setPathId ( int  pathid)

Set path id.

Parameters
pathidid of a path

◆ setValidSequence()

void cTheoreticalSpectrum::setValidSequence ( regex &  searchedsequence)

Set a flag determining if the candidate sequence corresponds to the searched sequence.

Parameters
searchedsequencesearched sequence

◆ sortByMass()

void cTheoreticalSpectrum::sortByMass ( int  limit = -1)

Sort peaks by mass.

Parameters
limitsort first limit peaks only; if limit == -1 then all peaks are sorted

◆ store()

void cTheoreticalSpectrum::store ( ofstream &  os)

Store the structure into an output stream.

Parameters
osan output stream

The documentation for this class was generated from the following files: