CycloBranch
cDeNovoGraph.h
Go to the documentation of this file.
1
7#ifndef _CDENOVOGRAPH_H
8#define _CDENOVOGRAPH_H
9
10#include <iostream>
11#include <fstream>
12#include <vector>
13#include <string>
14
15#include "core/cParameters.h"
21
22class cMainThread;
23
24
25using namespace std;
26
27
31const long long unsigned maximumcandidates = 1000000000;
32
33
41
42
47
48 cParameters* parameters;
49 vector<cDeNovoGraphNode> graph;
50 cPeaksList sortedpeaklist;
51 cBricksDatabase bricksdatabasewithcombinations;
52 int lastsystemnode;
53 cMainThread* os;
54 int startnode;
55
56 cGraphReaderThread* graphreaderthread;
57
58 bool findPath(int sourcenodeid, int edgeid, int targetnodeid, string& composition, string brickspath, int maximumbricksincombination, vector<nodeEdge>& path, bool& terminatecomputation);
59
60 // create vectors of edges from temporary unordered_sets
61 void createVectorsOfEdges();
62
63 // check whether a path leads to the precursor
64 bool finishInPrecursor(int currentnode, double cummass);
65
66
67public:
68
73
74
80 void initialize(cMainThread& os, cParameters& parameters);
81
82
88 int createGraph(bool& terminatecomputation);
89
90
96 int removeEdgesFormingPathsNotFinishingInPrecursor(bool& terminatecomputation);
97
98
104 int removeEdgesFormingPathsNotStartingFromFirstNode(bool& terminatecomputation);
105
106
112 int connectEdgesFormingPathsNotFinishingInPrecursor(bool& terminatecomputation);
113
114
120 int connectEdgesFormingPathsNotStartingFromFirstNode(bool& terminatecomputation);
121
122
128 int removePathsWhichCanBeSubstitutedByLongerPath(bool& terminatecomputation);
129
130
138 void startGraphReader(cCandidateSet& candidates, long long unsigned& count, int scanmode, bool& terminatecomputation);
139
140
145 int getNumberOfEdges();
146
147
155 void printPaths(cMainThread* os, cDeNovoGraphNode& node, vector<string>& path, vector<string>& composition);
156
157
162 string printGraph();
163
164
170 cDeNovoGraphNode& operator[](int position);
171
172
176 void sortEdgesByPPMError();
177
178
183
184
190
191};
192
193
194#endif
The database of building blocks.
bool compareNodes(cDeNovoGraphNode &node1, cDeNovoGraphNode &node2)
Compare two nodes.
Definition: cDeNovoGraph.cpp:6
const long long unsigned maximumcandidates
Maximum number of candidates to be read from the graph.
Definition: cDeNovoGraph.h:31
The representation of a node in the de novo graph.
The thread which scans the de novo graph for peptide sequence candidates.
Definitions of program parameters.
The representation of a series of peaklists.
The representation of lists of theoretical spectra.
The class representing a database of building blocks (bricks).
Definition: cBricksDatabase.h:66
The class representing a set of peptide sequence candidates.
Definition: cCandidateSet.h:18
The class implementing the de novo graph.
Definition: cDeNovoGraph.h:46
int removeEdgesFormingPathsNotFinishingInPrecursor(bool &terminatecomputation)
Remove edges which do not form a path finishing in the precursor.
Definition: cDeNovoGraph.cpp:990
cDeNovoGraph()
The constructor.
Definition: cDeNovoGraph.cpp:14
void initialize(cMainThread &os, cParameters &parameters)
Initialize the graph.
Definition: cDeNovoGraph.cpp:129
void sortEdgesByPPMError()
Sort edges by ppm error.
Definition: cDeNovoGraph.cpp:1458
int connectEdgesFormingPathsNotStartingFromFirstNode(bool &terminatecomputation)
Connect edges which do not start from system nodes.
Definition: cDeNovoGraph.cpp:1216
void printPaths(cMainThread *os, cDeNovoGraphNode &node, vector< string > &path, vector< string > &composition)
Print all paths in the graph into a stream.
Definition: cDeNovoGraph.cpp:1341
int connectEdgesFormingPathsNotFinishingInPrecursor(bool &terminatecomputation)
Connect edges which do not form a path finishing in the precursor.
Definition: cDeNovoGraph.cpp:1081
int removePathsWhichCanBeSubstitutedByLongerPath(bool &terminatecomputation)
Remove paths which can be substituted by longer paths.
Definition: cDeNovoGraph.cpp:1282
int createGraph(bool &terminatecomputation)
Create the graph.
Definition: cDeNovoGraph.cpp:138
cBricksDatabase * getBrickDatabaseWithCombinations()
Access to the database of bricks with combinations of bricks.
Definition: cDeNovoGraph.cpp:1472
string printGraph()
Print the graph to a string.
Definition: cDeNovoGraph.cpp:1385
int removeEdgesFormingPathsNotStartingFromFirstNode(bool &terminatecomputation)
Remove edges which do not start from system nodes.
Definition: cDeNovoGraph.cpp:1037
int getNumberOfEdges()
Get the number of edges.
Definition: cDeNovoGraph.cpp:1332
void startGraphReader(cCandidateSet &candidates, long long unsigned &count, int scanmode, bool &terminatecomputation)
Start the graph reader.
Definition: cDeNovoGraph.cpp:1323
void sortEdgesByTargetNodeIntensity()
Sort edges by target node intensity.
Definition: cDeNovoGraph.cpp:1465
cDeNovoGraphNode & operator[](int position)
Overloaded operator [].
Definition: cDeNovoGraph.cpp:1453
The class representing a node in the de novo graph.
Definition: cDeNovoGraphNode.h:229
The class representing a thread which scans the de novo graph for peptide sequence candidates.
Definition: cGraphReaderThread.h:31
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