CycloBranch
cParameters.h
Go to the documentation of this file.
1
7#ifndef _CPARAMETERS_H
8#define _CPARAMETERS_H
9
10#include <iostream>
11#include <fstream>
12#include <set>
13#include "core/utilities.h"
18
19
20class cMainThread;
21
22
23using namespace std;
24using namespace boost;
25
26
31 txt = 0,
32 mgf,
33 mzML,
34 mzXML,
35 baf,
36 raw,
37 dat,
38 imzML,
39 mis,
40 ser
41};
42
43
48 number_of_matched_peaks = 0,
49 sum_of_relative_intensities = 1,
50 number_of_b_ions = 2,
51 number_of_y_ions = 3,
52 number_of_b_and_y_ions = 4,
53 weighted_ratio_of_matched_peaks = 5,
54 cosine_similarity = 6
55};
56
57
65bool checkSeniorRules(vector<int>& combarray, vector<int>& valences, int maxcomponents);
66
67
76bool checkAdvancedFilteringRules(bool noratiocheck, double sumofmasses, vector<int>& countsofelements, vector<string>& namesofelements);
77
78
83
84 cMainThread* os;
85
86 void fixIntensities(cPeaksList& centroidspectrum, cPeaksList& profilespectrum);
87
88 void pushLossItem(vector<neutralLoss>& lossitems, string lossstr);
89
90 //double getMassAndCounts(vector<int>& combarray, vector<int>& countsofelements, vector<double>& massesofelements);
91
92
93public:
94
95
100
101
106
107
111 vector<string> peaklistfilenames;
112
113
118
119
124
125
130
131
136
137
142
143
147 vector<ePeakListFileFormat> peaklistfileformats;
148
149
153 vector<cPeakListSeries> peaklistseriesvector;
154
155
160
161
166
167
172
173
177 vector<string> metaladducts;
178
179
184
185
190
191
196
197
202
203
208
209
213 double minimummz;
214
215
219 double maximummz;
220
221
225 double minimumrt;
226
227
231 double maximumrt;
232
233
237 double fwhm;
238
239
244
245
250
251
256
257
262
263
268
269
274
275
280
281
286
287
292
293
298
299
304
305
310
311
316
317
322
323
328
329
334
335
340
341
346
347
352
353
358
359
364
365
370
371
376
377
382
383
388
389
394
395
400
401
406
407
412
413
418
419
424
425
430
431
436
437
442
443
447 //bool clearhitswithoutparent;
448
449
454
455
460
461
466
467
472
473
478
479
484
485
490
491
496
497
502
503
508
509
514
515
520
521
526
527
532
533
538
539
544
545
550
551
556
557
562
563
568
569
574
575
580
581
586
587
592
593
598
599
604
605
610
611
616
617
622
623
628
629
634
635
640
641
645 vector<cFragmentIonType> searchedmodifications;
646
647
651 vector<eFragmentIonType> fragmentionsfordenovograph;
652
653
658
659
663 vector<eFragmentIonType> ionsfortheoreticalspectraMS2;
664
665
669 vector<neutralLoss> neutrallossesdefinitions;
670
671
676
677
682
683
688
689
694
695
699 vector<neutralLoss> originalelementsdefinitions;
700
701
706
707
711 vector<string> peakidtodesc;
712
713
718
719
723 map<string, int> pchemresults;
724
725
730
731
736
737
742
743
748
749
754
755
759 cParameters();
760
761
765 void clear();
766
767
773 int checkAndPrepare(bool& terminatecomputation);
774
775
781 int prepareLossesAndCompounds(bool& terminatecomputation);
782
783
793 bool checkModifications(cSequence& sequence, int& startmodifid, int& endmodifid, int& middlemodifid, string& errormessage);
794
795
800 string printToString();
801
802
808
809
814
815
822 int calculateNeutralLosses(bool& terminatecomputation, string& errormessage);
823
824
831 int generateCompounds(bool& terminatecomputation, string& errormessage);
832
833
838 void store(ofstream& os);
839
840
848 void load(ifstream& is, int fileversionpart1, int fileversionpart2, int fileversionpart3);
849
850
851};
852
853
858
859
864
868 double mz;
869
870
874 int id;
875
876};
877
878
882bool compareHints(const hintStructure& a, const hintStructure& b);
883
884
885
893void searchHintForDeNovo(double mzratio, vector<hintStructure>& experimentalpeaks, double fragmentmasserrortolerance, set<int>& hintset);
894
895
896#endif
The database of building blocks.
The representation of a set of peptide sequence candidates.
Q_DECLARE_METATYPE(cParameters)
Register cParameters by Qt.
ePeakListFileFormat
Peak list file formats supported by the application.
Definition: cParameters.h:30
void searchHintForDeNovo(double mzratio, vector< hintStructure > &experimentalpeaks, double fragmentmasserrortolerance, set< int > &hintset)
Get IDs of spectra in which the theoretical m/z ratio can be found.
Definition: cParameters.cpp:3499
bool checkSeniorRules(vector< int > &combarray, vector< int > &valences, int maxcomponents)
Check Senior's filtering rules.
Definition: cParameters.cpp:11
bool checkAdvancedFilteringRules(bool noratiocheck, double sumofmasses, vector< int > &countsofelements, vector< string > &namesofelements)
Check advanced filtering rules.
Definition: cParameters.cpp:32
bool compareHints(const hintStructure &a, const hintStructure &b)
An auxiliary comparator for search hints.
Definition: cParameters.cpp:3494
eScoreType
The types of scores between an experimental and a theoretical spectrum.
Definition: cParameters.h:47
The representation of a series of peaklists.
The database of sequences.
The class representing a database of building blocks (bricks).
Definition: cBricksDatabase.h:66
The detailed definitions of all supported fragment ion types.
Definition: cFragmentIons.h:1070
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
ePeptideType peptidetype
The type of analyzed peptide.
Definition: cParameters.h:105
double minratio65Cu63Cu
Minimum ratio 65Cu/63Cu.
Definition: cParameters.h:303
cFragmentIons iondefinitions
Definitions of ion types.
Definition: cParameters.h:99
int maximumnumberofthreads
Maximum number of threads.
Definition: cParameters.h:417
vector< string > metaladducts
A list of parsed metal adducts from precursoradduct.
Definition: cParameters.h:177
vector< string > peakidtodesc
A vector of peak descriptions.
Definition: cParameters.h:711
double minratio60Ni58Ni
Minimum ratio 60Ni/58Ni.
Definition: cParameters.h:267
int minimumpatternsize
The minimum number of peaks in a matched pattern.
Definition: cParameters.h:465
map< string, int > pchemresults
An auxiliary map to store search results from PubChem in Compound Search mode.
Definition: cParameters.h:723
vector< neutralLoss > originalneutrallossesdefinitions
A vector of all neutral losses (without combinations of losses).
Definition: cParameters.h:675
bool convertprofiledata
Convert profile data.
Definition: cParameters.h:129
int maximumnumberofcandidates
Maximum number of peptide sequence candidates.
Definition: cParameters.h:621
eScoreType scoretype
A type of score.
Definition: cParameters.h:429
double maxratio66Zn64Zn
Maximum ratio 66Zn/64Zn.
Definition: cParameters.h:327
bool checkModifications(cSequence &sequence, int &startmodifid, int &endmodifid, int &middlemodifid, string &errormessage)
Check if the names of modifications used in a sequence are correct.
Definition: cParameters.cpp:1617
int scannumber
Scan number.
Definition: cParameters.h:159
string searchedsequenceformula
Formula of searched sequence.
Definition: cParameters.h:615
string searchedsequenceCtermmodif
C-terminal modification of a searched peptide.
Definition: cParameters.h:603
bool enablescrambling
True if the detection of scrambled ions is enabled.
Definition: cParameters.h:549
bool noratiocheck
Check N/O ratio.
Definition: cParameters.h:495
string bricksdatabasefilename
A file name of a bricks database.
Definition: cParameters.h:369
int hitsreported
Maximum number of reported hits.
Definition: cParameters.h:567
double maxratio65Cu63Cu
Maximum ratio 65Cu/63Cu.
Definition: cParameters.h:309
int maximumbricksincombinationmiddle
The maximum number of bricks in combination (in the middle of a spectrum).
Definition: cParameters.h:387
bool enableratio67Zn64Zn
Enable 67Zn/64Zn ratio.
Definition: cParameters.h:333
int precursorcharge
The charge of the precursor ion.
Definition: cParameters.h:189
vector< neutralLoss > neutrallossesdefinitions
A vector of all neutral losses.
Definition: cParameters.h:669
int maximumbricksincombinationbegin
The maximum number of bricks in combination (at the beginning of a spectrum).
Definition: cParameters.h:381
int minimumfeaturesize
The minimum number of consecutive scans in which a compound must be identified to be reported (LC-MS ...
Definition: cParameters.h:471
double maxratio62Ni58Ni
Maximum ratio 62Ni/58Ni.
Definition: cParameters.h:291
double minratio66Zn64Zn
Minimum ratio 66Zn/64Zn.
Definition: cParameters.h:321
double minimummz
Minimum m/z ratio.
Definition: cParameters.h:213
double maxratio60Ni58Ni
Maximum ratio 60Ni/58Ni.
Definition: cParameters.h:273
bool enableratio60Ni58Ni
Enable 60Ni/58Ni ratio.
Definition: cParameters.h:261
int linebafprocessing
Line spectra processing method (baf).
Definition: cParameters.h:141
bool generateisotopepattern
True when complete isotope pattern is generated.
Definition: cParameters.h:459
string originalpeaklistfilenames
Original input line with peaklist(s).
Definition: cParameters.h:117
double maximumrt
Maximum retention time.
Definition: cParameters.h:231
string originalsequencetag
A copy of sequence tag.
Definition: cParameters.h:579
string profiledatafilename
Profile data file name.
Definition: cParameters.h:135
bool cycliccterminus
True if the C-terminus of a linear peptide is cyclized.
Definition: cParameters.h:537
vector< eFragmentIonType > fragmentionsfordenovograph
A vector of fragment ion types generated in the de novo graph.
Definition: cParameters.h:651
int calculateNeutralLosses(bool &terminatecomputation, string &errormessage)
Calculate a list of neutral losses.
Definition: cParameters.cpp:1991
double minimumrt
Minimum retention time.
Definition: cParameters.h:225
string precursoradduct
An adduct of a precursor ion.
Definition: cParameters.h:171
string originalsearchedsequence
A copy of searched sequence.
Definition: cParameters.h:591
int maximumbricksincombination
The global maximum number of bricks in combination (maximum from maximumbricksincombinationbegin,...
Definition: cParameters.h:399
vector< cFragmentIonType > searchedmodifications
A vector of searched N-terminal and C-terminal modifications.
Definition: cParameters.h:645
vector< string > isotopeformulaidtodesc
A vector of isotope formula descriptions.
Definition: cParameters.h:717
int numberofgeneratedneutrallosses
A number of generated combinations of neutral losses.
Definition: cParameters.h:687
int defaultpixelsizex
Pixel size x - parsed from imzML file.
Definition: cParameters.h:741
cSequenceDatabase sequencedatabase
A structure representing a database of sequences.
Definition: cParameters.h:639
double maximummz
Maximum m/z ratio.
Definition: cParameters.h:219
double minratio62Ni58Ni
Minimum ratio 62Ni/58Ni.
Definition: cParameters.h:285
bool regularblocksorder
True if the order of polyketide blocks is regularly changed.
Definition: cParameters.h:561
double intensitytolerance
Maximum tolerance of intensities of matched isotopes.
Definition: cParameters.h:525
string modificationsfilename
A file with modifications.
Definition: cParameters.h:411
bool enableratio68Zn64Zn
Enable 68Zn/64Zn ratio.
Definition: cParameters.h:351
eVendorType vendor
Vendor type.
Definition: cParameters.h:753
double minimumannotationintensityrelative
Minimum relative intensity of the most intense peak in an isotopic pattern.
Definition: cParameters.h:507
unsigned minimumabsoluteintensitythreshold
Minimum absolute intensity threshold.
Definition: cParameters.h:207
bool useprofiledata
Use profile data.
Definition: cParameters.h:123
int maximumcombinedelements
Maximum number of combined chemical elements.
Definition: cParameters.h:441
double mzdifftolerance
Maximum m/z tolerance of matched isotopes.
Definition: cParameters.h:519
bool basicformulacheck
Apply Senior's filtering rules.
Definition: cParameters.h:483
int blindedges
The identifier of an action with edges forming incomplete paths.
Definition: cParameters.h:627
void load(ifstream &is, int fileversionpart1, int fileversionpart2, int fileversionpart3)
Load the structure from an input stream.
Definition: cParameters.cpp:3154
int maximumcombinedlosses
Maximum number of combined neutral losses.
Definition: cParameters.h:435
double fragmentmasserrortolerance
Fragment mass error tolerance (ppm).
Definition: cParameters.h:195
string searchedsequenceNtermmodif
N-terminal modification of a searched peptide.
Definition: cParameters.h:597
double maxratio54Fe56Fe
Maximum ratio 54Fe/56Fe.
Definition: cParameters.h:255
bool enableratio54Fe56Fe
Enable 54Fe/56Fe ratio.
Definition: cParameters.h:243
string searchedsequence
A searched sequence.
Definition: cParameters.h:585
vector< int > originalelementsfortheoreticalspectra
A vector of elements used when generating compounds (without combinations).
Definition: cParameters.h:705
int defaultpixelsizey
Pixel size y - parsed from imzML file.
Definition: cParameters.h:747
bool cyclicnterminus
True if the N-terminus of a linear peptide is cyclized.
Definition: cParameters.h:531
bool similaritysearch
True if the similarity search is enabled.
Definition: cParameters.h:555
double minratio54Fe56Fe
Minimum ratio 54Fe/56Fe.
Definition: cParameters.h:249
int generateCompounds(bool &terminatecomputation, string &errormessage)
Generate compounds.
Definition: cParameters.cpp:2403
vector< int > neutrallossesfortheoreticalspectra
A vector of neutral losses generated in theoretical spectra.
Definition: cParameters.h:681
void store(ofstream &os)
Store the structure into an output stream.
Definition: cParameters.cpp:2947
int defaultmaxy
Max count of pixel y - parsed from imzML file.
Definition: cParameters.h:735
string sequencedatabasefilename
A file name of a sequence database.
Definition: cParameters.h:633
vector< int > originalneutrallossesfortheoreticalspectra
A vector of neutral losses generated in theoretical spectra (without combinations).
Definition: cParameters.h:693
double maxratio68Zn64Zn
Maximum ratio 68Zn/64Zn.
Definition: cParameters.h:363
cBricksDatabase bricksdatabase
A structure representing a database of bricks.
Definition: cParameters.h:375
vector< neutralLoss > originalelementsdefinitions
A vector of all elements (without combinations).
Definition: cParameters.h:699
double minratio68Zn64Zn
Minimum ratio 68Zn/64Zn.
Definition: cParameters.h:357
double minratio67Zn64Zn
Minimum ratio 67Zn/64Zn.
Definition: cParameters.h:339
double maxratio67Zn64Zn
Maximum ratio 67Zn/64Zn.
Definition: cParameters.h:345
cParameters()
The constructor.
Definition: cParameters.cpp:436
double fwhm
FWHM.
Definition: cParameters.h:237
string searchedsequenceTmodif
Terminal modification of a branch of searched branched peptide.
Definition: cParameters.h:609
void updateFragmentDefinitions()
Update definitions of fragment ions when cyclicnterminus, cycliccterminus or precursoradduct have bee...
Definition: cParameters.cpp:1981
bool calculatefdrs
Calculate FDRs.
Definition: cParameters.h:501
vector< string > peaklistfilenames
The filenames of peaklists.
Definition: cParameters.h:111
double precursormasserrortolerance
Precursor mass error tolerance (ppm).
Definition: cParameters.h:183
vector< cIonType > ionsfortheoreticalspectraMS1
A vector of ion types generated in theoretical conventional mass spectra.
Definition: cParameters.h:657
double maximumcumulativemass
The maximum cummulative mass of bricks.
Definition: cParameters.h:405
bool enableratio65Cu63Cu
Enable 65Cu/63Cu ratio.
Definition: cParameters.h:297
int maximumbricksincombinationend
The maximum number of bricks in combination (at the end of a spectrum).
Definition: cParameters.h:393
bool advancedformulacheck
Advanced filtering rules are aplied if compounds are generated in MS mode.
Definition: cParameters.h:489
string sequencetag
A sequence tag.
Definition: cParameters.h:573
void setOutputStream(cMainThread &os)
Set the ouput stream.
Definition: cParameters.cpp:1976
vector< eFragmentIonType > ionsfortheoreticalspectraMS2
A vector of ion types generated in theoretical fragment ion spectra.
Definition: cParameters.h:663
int prepareLossesAndCompounds(bool &terminatecomputation)
Prepare neutral losses and compounds.
Definition: cParameters.cpp:1575
eModeType mode
Program mode.
Definition: cParameters.h:423
double precursormass
Precursor mass of the peptide.
Definition: cParameters.h:165
double minimumrelativeintensitythreshold
Minimum relative intensity threshold.
Definition: cParameters.h:201
unsigned minimumannotationintensityabsolute
Minimum absolute intensity of the most intense peak in an isotopic pattern.
Definition: cParameters.h:513
int minimumiontypes
The minimum number of ion types which must be matched to report a given compound.
Definition: cParameters.h:477
string printToString()
Print parameters to a string.
Definition: cParameters.cpp:1675
vector< ePeakListFileFormat > peaklistfileformats
The file formats of peaklists.
Definition: cParameters.h:147
int defaultmaxx
Max count of pixel x - parsed from imzML file.
Definition: cParameters.h:729
int checkAndPrepare(bool &terminatecomputation)
Test restrictions of parameters and prepare some internal parameters.
Definition: cParameters.cpp:588
vector< cPeakListSeries > peaklistseriesvector
A structure representing a vector of series of peaklists.
Definition: cParameters.h:153
bool enableratio62Ni58Ni
Enable 62Ni/58Ni ratio.
Definition: cParameters.h:279
bool internalfragments
True if the internal fragments are generated.
Definition: cParameters.h:543
void clear()
Clear the structure.
Definition: cParameters.cpp:441
bool enableratio66Zn64Zn
Enable 66Zn/64Zn ratio.
Definition: cParameters.h:315
bool reportunmatchedtheoreticalpeaks
True when matches of peaks which do not have parent peaks are removed.
Definition: cParameters.h:453
The class representing a peak list.
Definition: cPeaksList.h:68
The class representing a database of sequences.
Definition: cSequenceDatabase.h:27
The class representing a sequence.
Definition: cSequence.h:26
An auxiliary structure for search hints.
Definition: cParameters.h:863
double mz
m/z value.
Definition: cParameters.h:868
int id
Spectrum ID.
Definition: cParameters.h:874
Auxiliary funtions and structures.
eModeType
Running modes of the application.
Definition: utilities.h:92
ePeptideType
The types of peptides supported by the application.
Definition: utilities.h:104
eVendorType
Vendor types.
Definition: utilities.h:82