CycloBranch
cTheoreticalSpectrum.h
Go to the documentation of this file.
1
7#ifndef _CTHEORETICALSPECTRUM_H
8#define _CTHEORETICALSPECTRUM_H
9
10#include <vector>
11#include <set>
12#include <unordered_set>
13#include <map>
14#include <string>
15#include <QMetaType>
16
17#include "core/cParameters.h"
19#include "core/cCandidateSet.h"
20
21class cMainThread;
22class cDeNovoGraph;
23
24
25using namespace std;
26
27
34int getNumberOfScoreHits(vector<double>& scores, double value);
35
36
40struct splitSite {
41
45 int first;
46
47
51 int second;
52
53
54 splitSite() {
55 first = 0;
56 second = 0;
57 }
58};
59
60
65
69 vector<int> series;
70
71
75 string name;
76
77
82 series.clear();
83 name = "";
84 }
85
86
91 void store(ofstream& os);
92
93
98 void load(ifstream& is);
99
100};
101
102
107
108 cParameters* parameters;
109 cPeaksList theoreticalpeaks;
110 cPeaksList experimentalpeaks;
111 cCandidate candidate;
112 int experimentalpeaksmatched;
113 vector<set<int> > experimentalmatches;
114 int scrambledpeaksmatched;
115 map<eFragmentIonType, map<int, int> > matchedions;
116 int peakstested;
117 double experimentalpeaksmatchedratio;
118 double weightedpeaksratio;
119 double cosinesimilarity;
120 int unmatchedexperimentalpeakscount;
121 string coveragebyseries;
122 bool valid;
123 double sumofrelativeintensities;
124 vector<string> rotationslabels;
125 int validposition;
126 int reversevalidposition;
127 int seriescompleted;
128 int pathid;
129 map<int, double> targetscores;
130 map<int, double> decoyscores;
131 map<int, double> fdrscores;
132
133 // remove hits of peaks without hits of parent peaks
134 void clearFalseHits(map<eFragmentIonType, map<int, vector<int> > >& series, vector<eFragmentIonType>& ions, vector<int>& losses);
135
136 // search for matches of experimental and theoretical peaks
137 void searchForPeakPairs(cPeaksList& theoreticalpeaks, int theoreticalpeaksrealsize, cPeaksList& experimentalpeaks, double fragmentmasserrortolerance);
138
139 // compute additional scores
140 void computeStatistics(bool writedescription);
141
142 // generate charged forms of fragments
143 void generateChargedFragments(cPeak& peak, map<string, int>& atoms, int& peaklistrealsize, int maxcharge, bool writedescription, bool disablesummary);
144
145 // generate precursor ion and its variants
146 void generatePrecursorIon(vector<int>& intcomposition, cBricksDatabase& bricksdatabasewithcombinations, int& theoreticalpeaksrealsize, bool writedescription);
147
148 // generate precursor ion and its variants for other type
149 void generatePrecursorIonForOther(int& theoreticalpeaksrealsize, bool writedescription);
150
151 // generate scrambled sequences
152 void generateScrambledIons(cBricksDatabase& bricksdatabase, bool writedescription, int& theoreticalpeaksrealsize);
153
154 // update the list of losses
155 void updateListOfNeutralLosses(cBricksDatabase& bricksdatabase, cBrick& block, vector<int>& currentlosses, vector<double>& fragmentlossmass, vector<string>& fragmentlosssummary, vector< map<string, int> >& fragmentlossmap, bool writedescription, bool disablesummary);
156
157 // generate internal fragments
158 void generateInternalFragments(cBricksDatabase& bricksdatabase, cPeak& peak, int maxcharge, int& peaklistrealsize, vector<int>& intcomposition, int pos, map<string, int>& atoms, vector<int>& currentlosses, eFragmentIonType fragmentiontype, ePeptideType peptidetype, TRotationInfo* trotation, bool writedescription, bool disablesummary);
159
160 // select and normalize scrambled sequences
161 void selectAndNormalizeScrambledSequences(unordered_set<string>& scrambledsequences);
162
163 // select a proper fragment ion type for an experimental peak when masses of more theoretical fragment ions collide
164 void selectHigherPriorityIonTypeCID(cPeak& experimentalpeak, cPeak& theoreticalpeak);
165
166 // add a peak to the list
167 void addPeakToList(cPeak& peak, int& theoreticalpeaksrealsize);
168
169 // add an adduct to a peak description
170 void addAdductToDescription(string& description, vector<string>& metals);
171
172 // add theoretical peaks containing metals
173 void addMetalPeaks(cPeak& peak, vector<string>& metals, int& peaklistrealsize, int peakcharge, bool writedescription);
174
175 // remove unmatched biometal isotopes
176 void removeUnmatchedMetalIsotopes(cPeaksList& theoreticalpeaks, int theoreticalpeaksrealsize, cPeaksList& experimentalpeaks);
177
178 // remove unmatched isotope patterns
179 void removeUnmatchedIsotopePatterns(cPeaksList& theoreticalpeaks, int theoreticalpeaksrealsize, cPeaksList& experimentalpeaks, cPeaksList& outputtheoreticalpeaks, bool storeunmatchedpeaks);
180
181 // remove unmatched features
182 int removeUnmatchedFeatures(bool lcms, int peaklistseriesvectorid, cPeaksList& theoreticalpeaks, int theoreticalpeaksrealsize, cPeaksList& experimentalpeaks, vector< vector<int> >& hintsindex/*, int id*/);
183
184 // remove unmatched compounds
185 int removeUnmatchedCompounds(cPeaksList& theoreticalpeaks, int theoreticalpeaksrealsize, cPeaksList& experimentalpeaks, int minimumiontypes);
186
187 // remove compounds outside RT range
188 void removeCompoundsOutsideRTRange(cPeaksList& theoreticalpeaks, int theoreticalpeaksrealsize, cPeaksList& experimentalpeaks);
189
190 // remove peaks under annotation threshold
191 void removePeaksUnderAnnotationThreshold(cPeaksList& theoreticalpeaks, int theoreticalpeaksrealsize, cPeaksList& experimentalpeaks);
192
193 // remove isotopic patterns under annotation threshold
194 void removePatternsUnderAnnotationThreshold(cPeaksList& theoreticalpeaks, int theoreticalpeaksrealsize, cPeaksList& experimentalpeaks);
195
196 // remove unmatched patterns in fine isotopic patterns
197 void removeUnmatchedPatternsFineSpectra(cPeaksList& theoreticalpeaks, int theoreticalpeaksrealsize, cPeaksList& experimentalpeaks);
198
199 // remove unmatched pattern by intensity ratio
200 void removeUnmatchedPatternsByIntensityRatio(cPeaksList& theoreticalpeaks, int theoreticalpeaksrealsize, cPeaksList& experimentalpeaks);
201
202 // remove unmatched pattern by m/z difference
203 void removeUnmatchedPatternsByMZDifference(cPeaksList& theoreticalpeaks, int theoreticalpeaksrealsize, cPeaksList& experimentalpeaks);
204
205 // calculate envelope scores
206 void calculateEnvelopeScores(cPeaksList& theoreticalpeaks, int theoreticalpeaksrealsize, cPeaksList& experimentalpeaks);
207
208 // remove decoy peak matches
209 void removeDecoyPeakMatches(cPeaksList& theoreticalpeaks, int theoreticalpeaksrealsize, cPeaksList& experimentalpeaks);
210
211 // normalize theoretical intensities
212 void normalizeTheoreticalIntensities(cPeaksList& theoreticalpeaks, int theoreticalpeaksrealsize);
213
214 // calibrate peaklist to the most intense theoretical peak
215 double recalibrateToMostIntenseTheoreticalPeak(cPeaksList& peaklist);
216
217 // calculate standard PPM deviation
218 double getStandardPPMDeviation(cPeaksList& theoreticalpeaks, int start, int stop);
219
220 // calculate standard intensity deviation
221 double getStandardIntensityDeviation(cPeaksList& theoreticalpeaks, int start, int stop, double maximumexperimentalintensity);
222
223 // calculate standard m/z difference deviation
224 double getStandardMZDifferenceDeviation(cPeaksList& theoreticalpeaks, int start, int stop);
225
226 // calculate the angle distance
227 double getAngleDistance(cPeaksList& theoreticalpeaks, int start, int stop);
228
229 // generate isotope patterns of fragment ions
230 void generateFragmentIsotopePatterns(int& theoreticalpeaksrealsize, bool writedescription, unordered_map<string, int>* isotopeformuladesctoid);
231
232 // fill annotations of experimental peaks and remove unmatched theoretical peaks
233 void fillExperimentalAnnotationsAndRemoveUnmatchedTheoreticalPeaks(int& theoreticalpeaksrealsize, ePeptideType peptidetype, cPeaksList& unmatchedpeaksinmatchedpatterns, bool reportunmatchedtheoreticalpeaks, bool writedescription);
234
235 // check the existence of an isotope
236 bool checkIsotopeHighRes(string& elementstring, string& isotopestring, double isotopemass1, double isotopemass2, double minintensityratio, double maxintensityratio, cPeaksList& theoreticalpeaks, int theoreticalpeaksrealsize, cPeaksList& experimentalpeaks, int start, int stop, int maximumintensityid, double maximumexperimentalintensity);
237
238 // check the existence of an isotope
239 bool checkIsotopeLowRes(string& elementstring, string& isotopestring, double isotopemass1, double isotopemass2, double minintensityratio, double maxintensityratio, cPeaksList& theoreticalpeaks, int theoreticalpeaksrealsize, cPeaksList& experimentalpeaks, int start, int stop, int maximumintensityid, double maximumexperimentalintensity);
240
241 // get intensity multiplier
242 double getIntensityMultiplier(cPeaksList& theoreticalpeaks, int peakid, string& elementstring, size_t startpos);
243
244
245public:
246
247
252
253
259 cTheoreticalSpectrum(cParameters* parameters, cCandidate& candidate);
260
261
266 void clear(bool clearpeaklist = true);
267
268
274
275
280 void setCandidate(cCandidate& candidate);
281
282
287 int getNumberOfPeaks();
288
289
301 int compareBranched(cPeaksList& sortedpeaklist, cBricksDatabase& bricksdatabasewithcombinations, bool writedescription, regex& sequencetag, regex& searchedsequence, cPeaksList& unmatchedpeaksinmatchedpatterns, unordered_map<string, int>* isotopeformuladesctoid);
302
303
315 int compareLinear(cPeaksList& sortedpeaklist, cBricksDatabase& bricksdatabasewithcombinations, bool writedescription, regex& sequencetag, regex& searchedsequence, cPeaksList& unmatchedpeaksinmatchedpatterns, unordered_map<string, int>* isotopeformuladesctoid);
316
317
329 int compareCyclic(cPeaksList& sortedpeaklist, cBricksDatabase& bricksdatabasewithcombinations, bool writedescription, regex& sequencetag, regex& searchedsequence, cPeaksList& unmatchedpeaksinmatchedpatterns, unordered_map<string, int>* isotopeformuladesctoid);
330
331
343 int compareBranchCyclic(cPeaksList& sortedpeaklist, cBricksDatabase& bricksdatabasewithcombinations, bool writedescription, regex& sequencetag, regex& searchedsequence, cPeaksList& unmatchedpeaksinmatchedpatterns, unordered_map<string, int>* isotopeformuladesctoid);
344
345
357 int compareLinearPolyketide(cPeaksList& sortedpeaklist, cBricksDatabase& bricksdatabasewithcombinations, bool writedescription, regex& sequencetag, regex& searchedsequence, cPeaksList& unmatchedpeaksinmatchedpatterns, unordered_map<string, int>* isotopeformuladesctoid);
358
359
371 int compareCyclicPolyketide(cPeaksList& sortedpeaklist, cBricksDatabase& bricksdatabasewithcombinations, bool writedescription, regex& sequencetag, regex& searchedsequence, cPeaksList& unmatchedpeaksinmatchedpatterns, unordered_map<string, int>* isotopeformuladesctoid);
372
373
382 int compareOther(cPeaksList& sortedpeaklist, bool writedescription, cPeaksList& unmatchedpeaksinmatchedpatterns, unordered_map<string, int>* isotopeformuladesctoid);
383
384
392 void generateMSSpectrum(int sequencestart, int sequencestop, bool& terminatecomputation, bool writedescription);
393
394
401 void generateFineMSSpectrum(int sequencestart, int sequencestop, bool& terminatecomputation);
402
403
414 void getHintsIndex(int id, int peaklistseriesvectorid, cTheoreticalSpectrum& tsfull, cPeaksList& unmatchedpeaksinmatchedpatterns, vector< vector<int> >& hintsindex, bool lcmsrt, bool skipcomparison);
415
416
427 void compareMSSpectrum(int id, int peaklistseriesvectorid, cTheoreticalSpectrum& tsfull, cPeaksList& unmatchedpeaksinmatchedpatterns, vector< vector<int> >& hintsindex, bool lcmsrt, bool skipcomparison);
428
429
436 void compareAverageMSSpectrum(cPeaksList& averagespectrum, cTheoreticalSpectrum& tsfull, cPeaksList& unmatchedpeaksinmatchedpatterns);
437
438
439
445 void finalizeMSSpectrum(cPeaksList& unmatchedpeaksinmatchedpatterns, bool writedescription);
446
447
452 int getNumberOfMatchedPeaks() const;
453
454
460
461
468 int getNumberOfMatchedPeaks(eFragmentIonType iontype, int neutrallosstype) const;
469
470
475 int getNumberOfMatchedPeaksB() const;
476
477
482 int getNumberOfMatchedPeaksY() const;
483
484
489 int getNumberOfMatchedPeaksYB() const;
490
491
496 double getRatioOfMatchedPeaks();
497
498
503 double getWeightedRatioOfMatchedPeaks() const;
504
505
510 double getCosineSimilarity() const;
511
512
531 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);
532
533
552 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);
553
554
559 void sortByMass(int limit = -1);
560
561
566 void resizePeakList(int size);
567
568
573 double getSumOfRelativeIntensities() const;
574
575
581 cPeak& operator[](int position);
582
583
589
590
595 void setExperimentalSpectrum(cPeaksList& experimentalspectrum);
596
597
602 set<int>& getExperimentalMatches(int peakid);
603
604
609 string getCoverageBySeries();
610
611
617
618
624
625
630 bool isValid();
631
632
637 int getValidPosition();
638
639
645
646
651 void setValidSequence(regex& searchedsequence);
652
653
658 vector<string>& getLabelsOfRotations();
659
660
666
667
672 void setNumberOfCompletedSeries(int numberofcompletedseries);
673
674
679 void setPathId(int pathid);
680
681
686 int getPathId() const;
687
688
693 void setParameters(cParameters* parameters);
694
695
701 double getTargetPatternScore(int groupid);
702
703
709 double getTargetPatternFDR(int groupid);
710
711
716 map<int, double>& getTargetScores();
717
718
723 map<int, double>& getDecoyScores();
724
725
732 void setFDRs(vector<double>& targetscoresvector, vector<double>& fdrs, cPeaksList& unmatchedpeaksinmatchedpatterns);
733
734
739 void store(ofstream& os);
740
741
749 void load(ifstream& is, int fileversionpart1, int fileversionpart2, int fileversionpart3);
750
751
757 bool equals(cTheoreticalSpectrum& secondtheoreticalspectrum);
758
759
764 void attach(cTheoreticalSpectrum& secondtheoreticalspectrum);
765
766};
767
768
769#endif
770
eResidueLossType
Residue loss types.
Definition: cBrick.h:24
The representation of a set of peptide sequence candidates.
eFragmentIonType
The types of supported fragment ions.
Definition: cFragmentIons.h:944
Definitions of program parameters.
The representation of a series of peaklists.
int getNumberOfScoreHits(vector< double > &scores, double value)
Get the number of hits with equal or better score.
Definition: cTheoreticalSpectrum.cpp:8
The class representing a building block (brick).
Definition: cBrick.h:41
The class representing a database of building blocks (bricks).
Definition: cBricksDatabase.h:66
The class representing a peptide sequence candidate.
Definition: cCandidate.h:131
The class implementing the de novo graph.
Definition: cDeNovoGraph.h:46
The class representing a thread launched by the command 'Search->Run'.
Definition: cMainThread.h:34
The class storing parameters of the application.
Definition: cParameters.h:82
The class representing a peak list.
Definition: cPeaksList.h:68
The class representing a theoretical mass spectrum.
Definition: cTheoreticalSpectrum.h:106
void compareAverageMSSpectrum(cPeaksList &averagespectrum, cTheoreticalSpectrum &tsfull, cPeaksList &unmatchedpeaksinmatchedpatterns)
Compare theoretical peaks with an average spectrum.
Definition: cTheoreticalSpectrum.cpp:5275
void setPathId(int pathid)
Set path id.
Definition: cTheoreticalSpectrum.cpp:6265
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.
Definition: cTheoreticalSpectrum.cpp:3832
double getTargetPatternScore(int groupid)
Get target pattern score.
Definition: cTheoreticalSpectrum.cpp:6280
void resizePeakList(int size)
Resize the list of peaks.
Definition: cTheoreticalSpectrum.cpp:6052
double getSumOfRelativeIntensities() const
Get the sum of relative intensities of matched peaks.
Definition: cTheoreticalSpectrum.cpp:6057
int getNumberOfCompletedSeries()
Get a number of series which identify the peptide.
Definition: cTheoreticalSpectrum.cpp:6255
int getNumberOfMatchedPeaks() const
Get the number of matched peaks between an experimental and a theoretical spectrum.
Definition: cTheoreticalSpectrum.cpp:5407
cPeaksList * getTheoreticalPeaks()
Get a list of theoretical peaks.
Definition: cTheoreticalSpectrum.cpp:6095
void store(ofstream &os)
Store the structure into an output stream.
Definition: cTheoreticalSpectrum.cpp:6349
void generateFineMSSpectrum(int sequencestart, int sequencestop, bool &terminatecomputation)
Generate a simple mass spectrum with fine isotopic patterns.
Definition: cTheoreticalSpectrum.cpp:4988
string getCoverageBySeries()
Get coverage of series of fragment ions.
Definition: cTheoreticalSpectrum.cpp:6085
int getNumberOfMatchedPeaksB() const
Get the number of matched B ions between an experimental and a theoretical spectrum.
Definition: cTheoreticalSpectrum.cpp:5427
bool equals(cTheoreticalSpectrum &secondtheoreticalspectrum)
Check if the object equals to another object.
Definition: cTheoreticalSpectrum.cpp:6517
bool isValid()
Check if the candidate sequence corresponds to the searched sequence.
Definition: cTheoreticalSpectrum.cpp:6100
double getRatioOfMatchedPeaks()
Get a ratio of matched peaks.
Definition: cTheoreticalSpectrum.cpp:5486
void setExperimentalSpectrum(cPeaksList &experimentalspectrum)
Set the experimental spectrum.
Definition: cTheoreticalSpectrum.cpp:6072
int getReverseValidPosition()
Get a reverted position of a rotation of a cyclic peptide sequence corresponding to searched sequence...
Definition: cTheoreticalSpectrum.cpp:6110
void generateMSSpectrum(int sequencestart, int sequencestop, bool &terminatecomputation, bool writedescription)
Generate a simple mass spectrum.
Definition: cTheoreticalSpectrum.cpp:4901
void setNumberOfCompletedSeries(int numberofcompletedseries)
Set a number of series which identify the peptide.
Definition: cTheoreticalSpectrum.cpp:6260
void setFDRs(vector< double > &targetscoresvector, vector< double > &fdrs, cPeaksList &unmatchedpeaksinmatchedpatterns)
Set false discovery rates to peak groups.
Definition: cTheoreticalSpectrum.cpp:6300
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.
Definition: cTheoreticalSpectrum.cpp:5078
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.
Definition: cTheoreticalSpectrum.cpp:4634
int getNumberOfMatchedPeaksY() const
Get the number of matched Y ions between an experimental and a theoretical spectrum.
Definition: cTheoreticalSpectrum.cpp:5454
void setValidSequence(regex &searchedsequence)
Set a flag determining if the candidate sequence corresponds to the searched sequence.
Definition: cTheoreticalSpectrum.cpp:6115
int getUnmatchedExperimentalPeaksCount()
Get the number of unmatched experimental peaks.
Definition: cTheoreticalSpectrum.cpp:6090
int getPathId() const
Get path id.
Definition: cTheoreticalSpectrum.cpp:6270
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.
Definition: cTheoreticalSpectrum.cpp:3624
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.
Definition: cTheoreticalSpectrum.cpp:4328
cPeaksList & getExperimentalSpectrum()
Get an experimental spectrum which has been compared with the theoretical spectrum.
Definition: cTheoreticalSpectrum.cpp:6067
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.
Definition: cTheoreticalSpectrum.cpp:5140
cTheoreticalSpectrum()
The constructor.
Definition: cTheoreticalSpectrum.cpp:3567
map< int, double > & getDecoyScores()
Get map of decoy scores.
Definition: cTheoreticalSpectrum.cpp:6295
set< int > & getExperimentalMatches(int peakid)
Get ids of theoretical peaks which hit an experimental peak.
Definition: cTheoreticalSpectrum.cpp:6080
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.
Definition: cTheoreticalSpectrum.cpp:5501
int getNumberOfMatchedPeaksYB() const
Get the number of matched Y and B ions between an experimental and a theoretical spectrum.
Definition: cTheoreticalSpectrum.cpp:5481
int getNumberOfScrambledPeaks()
Get the number of matched scrambled peaks between an experimental and a theoretical spectrum.
Definition: cTheoreticalSpectrum.cpp:5412
int compareOther(cPeaksList &sortedpeaklist, bool writedescription, cPeaksList &unmatchedpeaksinmatchedpatterns, unordered_map< string, int > *isotopeformuladesctoid)
Compare the theoretical spectrum of a metabolite with an experimental spectrum.
Definition: cTheoreticalSpectrum.cpp:4854
cPeak & operator[](int position)
Overloaded operator [].
Definition: cTheoreticalSpectrum.cpp:6062
void attach(cTheoreticalSpectrum &secondtheoreticalspectrum)
Attach another spectrum.
Definition: cTheoreticalSpectrum.cpp:6631
void clear(bool clearpeaklist=true)
Clear the spectrum.
Definition: cTheoreticalSpectrum.cpp:3579
double getCosineSimilarity() const
Get cosine similarity.
Definition: cTheoreticalSpectrum.cpp:5496
map< int, double > & getTargetScores()
Get map of target scores.
Definition: cTheoreticalSpectrum.cpp:6290
cCandidate & getCandidate()
Get the peptide spectrum candidate.
Definition: cTheoreticalSpectrum.cpp:3614
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.
Definition: cTheoreticalSpectrum.cpp:4843
void finalizeMSSpectrum(cPeaksList &unmatchedpeaksinmatchedpatterns, bool writedescription)
Finalize MS spectrum after comparison.
Definition: cTheoreticalSpectrum.cpp:5384
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.
Definition: cTheoreticalSpectrum.cpp:4012
int getNumberOfPeaks()
Get the number of peaks in the spectrum.
Definition: cTheoreticalSpectrum.cpp:5402
void setParameters(cParameters *parameters)
Set a pointer to the parameters of the application.
Definition: cTheoreticalSpectrum.cpp:6275
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.
Definition: cTheoreticalSpectrum.cpp:5785
double getWeightedRatioOfMatchedPeaks() const
Get weighted ratio of matched peaks.
Definition: cTheoreticalSpectrum.cpp:5491
vector< string > & getLabelsOfRotations()
Get the labels of cyclic rotations.
Definition: cTheoreticalSpectrum.cpp:6250
void sortByMass(int limit=-1)
Sort peaks by mass.
Definition: cTheoreticalSpectrum.cpp:6047
double getTargetPatternFDR(int groupid)
Get target pattern FDR.
Definition: cTheoreticalSpectrum.cpp:6285
void setCandidate(cCandidate &candidate)
Set a peptide spectrum candidate.
Definition: cTheoreticalSpectrum.cpp:3619
int getValidPosition()
Get a position of a rotation of a cyclic peptide sequence corresponding to searched sequence.
Definition: cTheoreticalSpectrum.cpp:6105
void load(ifstream &is, int fileversionpart1, int fileversionpart2, int fileversionpart3)
Load the structure from an input stream.
Definition: cTheoreticalSpectrum.cpp:6424
An auxiliary structure representing a branch permutation of a branched peptide.
Definition: cCandidate.h:30
A structure representing a peak in a mass spectrum.
Definition: cPeak.h:22
An auxiliary structure for visualisation of matched series of fragment ions.
Definition: cTheoreticalSpectrum.h:64
void load(ifstream &is)
Load the structure from an input stream.
Definition: cTheoreticalSpectrum.cpp:50
vector< int > series
A vector of matched peaks in a series.
Definition: cTheoreticalSpectrum.h:69
string name
A name of a series of fragment ions.
Definition: cTheoreticalSpectrum.h:75
void store(ofstream &os)
Store the structure into an output stream.
Definition: cTheoreticalSpectrum.cpp:37
matchedSeries()
The constructor.
Definition: cTheoreticalSpectrum.h:81
The structure representing a splitting site of a cyclic peptide.
Definition: cTheoreticalSpectrum.h:40
int first
Order of the first amino acid where a cyclic peptide is split.
Definition: cTheoreticalSpectrum.h:45
int second
Order of the second amino acid where a cyclic peptide is split.
Definition: cTheoreticalSpectrum.h:51
ePeptideType
The types of peptides supported by the application.
Definition: utilities.h:104