11#include <unordered_set>
138 vector<nodeEdge> path;
143 vector<string> composition;
144 string internalcomposition;
145 int numberofinternalbricks;
147 string realpeptidename;
148 string acronympeptidename;
149 vector<string> acronyms;
150 vector<string> backboneacronyms;
151 vector<string> branchacronyms;
154 void updateInternalComposition();
156 void getPermutationsIter(
cCandidateSet& permutations, vector<string>& currentcandidate,
int position,
bool* terminatecomputation);
162 void getPartialRotations(
const string& composition, vector<string>& rotations);
164 void getPartialBranchCyclicRotations(
const string& composition, vector<cCandidate>& branchcyclicrotations,
int branchstart,
int branchend);
184 cCandidate(vector<string>& composition, vector<nodeEdge>& path,
eFragmentIonType startiontype,
int startmodifID,
int endmodifID,
int middlemodifID,
int middlepos);
198 cCandidate(vector<string>& composition, vector<nodeEdge>& path,
eFragmentIonType startiontype,
int startmodifID,
int endmodifID,
int middlemodifID,
int branchstart,
int branchend);
211 void setCandidate(vector<string>& composition, vector<nodeEdge>& path,
eFragmentIonType startiontype,
int startmodifID,
int endmodifID,
int middlemodifID,
int middlepos);
225 void setCandidate(vector<string>& composition, vector<nodeEdge>& path,
eFragmentIonType startiontype,
int startmodifID,
int endmodifID,
int middlemodifID,
int branchstart,
int branchend);
442 void getRotations(vector<string>& rotations,
bool includerevertedrotations);
481 void store(ofstream& os);
488 void load(ifstream& is);
656 return std::hash<string>()(((
cCandidate&)candidate).getComposition());
eResidueLossType
Residue loss types.
Definition: cBrick.h:24
The database of building blocks.
bool operator==(cCandidate const &a, cCandidate const &b)
Overloaded operator ==.
Definition: cCandidate.cpp:1496
The representation of a node in the de novo graph.
eFragmentIonType
The types of supported fragment ions.
Definition: cFragmentIons.h:944
Definitions of program parameters.
The class representing a database of building blocks (bricks).
Definition: cBricksDatabase.h:66
The class representing a peptide sequence candidate.
Definition: cCandidate.h:131
int getBranchStart()
Get starting position of a branch.
Definition: cCandidate.cpp:541
void setStartIonType(eFragmentIonType iontype)
Set start ion type used in the de novo graph.
Definition: cCandidate.cpp:1364
void setMiddleModifID(int id)
Set id of a terminal modification of a branched peptide (in the middle of a spectrum).
Definition: cCandidate.cpp:836
string & getRealPeptideName()
Get a real peptide name.
Definition: cCandidate.cpp:1354
void getBranchCyclicRotations(vector< cCandidate > &branchcyclicrotations, bool includerevertedrotations)
Get branch-cyclic rotations of a branch-cyclic peptide sequence.
Definition: cCandidate.cpp:980
void setStartModifID(int id)
Set id of a terminal modification (at the beginning of a spectrum).
Definition: cCandidate.cpp:815
int getBranchSize()
Get a number of blocks forming a branch.
Definition: cCandidate.cpp:533
bool isEqualTo(cCandidate &candidate)
Compare two candidates.
Definition: cCandidate.cpp:785
bool hasEqualTPermutations(cCandidate &candidate)
compare TPermutations of two candidates.
Definition: cCandidate.cpp:893
int getMiddleModifID()
Get id of a terminal modification of a branched peptide (in the middle of a spectrum).
Definition: cCandidate.cpp:831
int getBranchEnd()
Get end position of a branch.
Definition: cCandidate.cpp:546
vector< string > & getBackboneAcronyms()
Get a vector of acronyms corresponding to a backbone of a peptide sequence candidate.
Definition: cCandidate.cpp:1251
vector< string > & getAcronyms()
Get a vector of acronyms corresponding to a peptide sequence candidate.
Definition: cCandidate.cpp:1246
bool checkKetideSequence(cBricksDatabase &bricksdatabase, ePeptideType peptidetype, bool regularblocksorder)
Check if the order of blocks is correct.
Definition: cCandidate.cpp:1374
void prepareBranchedCandidates(cCandidateSet &result, ePeptideType peptidetype, bool *terminatecomputation)
Prepare candidates of a branched or a branch-cyclic peptide.
Definition: cCandidate.cpp:306
cSummaryFormula calculateSummaryFormulaFromBricks(cParameters ¶meters, ePeptideType peptidetype, double precursormass=0)
Calculate the summary formula of the peptide sequence candidate.
Definition: cCandidate.cpp:989
void setPath(cDeNovoGraph &graph, cParameters *parameters)
Set a path in the de novo graph corresponding to the candidate.
Definition: cCandidate.cpp:1261
bool compare(cCandidate &candidate)
Compare two candidates.
Definition: cCandidate.cpp:841
vector< string > & getBranchAcronyms()
Get a vector of acronyms corresponding to a branch of a peptide sequence candidate.
Definition: cCandidate.cpp:1256
string & getName()
Get the name of peptide.
Definition: cCandidate.cpp:1195
void getPermutationsOfBranches(vector< TRotationInfo > &tpermutations)
Get permutations of branches a branched peptide.
Definition: cCandidate.cpp:551
void setEndModifID(int id)
Set id of a terminal modification (at the end of a spectrum).
Definition: cCandidate.cpp:825
bool checkKetideBlocks(cBricksDatabase &bricksdatabase, ePeptideType peptidetype, bool regularblocksorder)
Check if the numbers of H2 loss and H2O loss blocks are correct.
Definition: cCandidate.cpp:1455
void getPermutations(cCandidateSet &permutations, bool *terminatecomputation)
Get a set of candidates with permutations of bricks.
Definition: cCandidate.cpp:802
cSummaryFormula & getSummaryFormula()
Get the summary formula of the peptide sequence candidate.
Definition: cCandidate.cpp:1115
int getEndModifID()
Get id of a terminal modification (at the end of a spectrum).
Definition: cCandidate.cpp:820
string getRealNameTComposition(cBricksDatabase &brickdatabase)
Get a T-composition of a branched peptide composed from real names of bricks.
Definition: cCandidate.cpp:507
string & getComposition()
Access to the composition of the peptide sequence candidate.
Definition: cCandidate.cpp:270
void setBackboneAcronyms(cBricksDatabase &bricksdatabase)
Set a vector of acronyms corresponding to a backbone of a peptide sequence candidate.
Definition: cCandidate.cpp:1214
string & getPathAsString()
Get a path in the de novo graph corresponding to the candidate as a string.
Definition: cCandidate.cpp:1305
void clear()
Clear the candidate.
Definition: cCandidate.cpp:247
string getRevertedTComposition(bool usebrackets)
Get a reverted T-composition of a branched peptide.
Definition: cCandidate.cpp:431
bool hasLastBrickArtificial(cBricksDatabase &brickdatabasewithcombinations)
Check if the last brick is artificial.
Definition: cCandidate.cpp:942
eResidueLossType getRightResidueType(cBricksDatabase &bricksdatabase)
Get the residue type of the right-most building block.
Definition: cCandidate.cpp:1441
void load(ifstream &is)
Load the structure from an input stream.
Definition: cCandidate.cpp:1158
vector< nodeEdge > & getPath()
Get a path in the de novo graph corresponding to the peptide sequence candidate.
Definition: cCandidate.cpp:888
string getTComposition()
Get a T-composition of a branched peptide.
Definition: cCandidate.cpp:405
void setAcronymPeptideNameWithHTMLReferences(cBricksDatabase &bricksdatabase, ePeptideType peptidetype)
Set an acronym peptide name.
Definition: cCandidate.cpp:1332
cCandidate()
The default constructor.
Definition: cCandidate.cpp:187
void setSummaryFormula(cSummaryFormula &summary)
Set the summary formula of the peptide sequence candidate.
Definition: cCandidate.cpp:1121
void setAcronyms(cBricksDatabase &bricksdatabase)
Set a vector of acronyms corresponding to a peptide sequence candidate.
Definition: cCandidate.cpp:1200
void setRealPeptideName(cBricksDatabase &bricksdatabase, ePeptideType peptidetype)
Set a real peptide name.
Definition: cCandidate.cpp:1310
void revertComposition()
Reverse the bricks composition of the candidate.
Definition: cCandidate.cpp:275
eResidueLossType getLeftResidueType(cBricksDatabase &bricksdatabase)
Get the residue type of the left-most building block.
Definition: cCandidate.cpp:1427
bool hasOnlyArtificialBricks(cBricksDatabase &brickdatabasewithcombinations)
Check whether the candidate is composed exclusively from artificial bricks.
Definition: cCandidate.cpp:913
void setName(string &name)
Set the name of peptide.
Definition: cCandidate.cpp:1190
void store(ofstream &os)
Store the structure into an output stream.
Definition: cCandidate.cpp:1126
double calculatePrecursorMassFromBricks(cBricksDatabase &brickdatabasewithcombinations, cParameters *parameters)
Calculate the precursor mass of the peptide sequence candidate from bricks.
Definition: cCandidate.cpp:741
string getAcronymsTComposition(cBricksDatabase &brickdatabase)
Get a T-composition of a branched peptide composed from acronyms of bricks.
Definition: cCandidate.cpp:481
bool hasLastBrickInvalid(cBricksDatabase &brickdatabasewithcombinations)
Check if the last brick is invalid.
Definition: cCandidate.cpp:954
string & getAcronymPeptideNameWithHTMLReferences()
Get an acronym peptide name.
Definition: cCandidate.cpp:1359
int getStartModifID()
Get id of a terminal modification (at the beginning of a spectrum).
Definition: cCandidate.cpp:810
eFragmentIonType getStartIonType()
Get start ion type used in the de novo graph.
Definition: cCandidate.cpp:1369
void setBranchAcronyms(cBricksDatabase &bricksdatabase)
Set a vector of acronyms corresponding to a branch of a peptide sequence candidate.
Definition: cCandidate.cpp:1230
void setCandidate(vector< string > &composition, vector< nodeEdge > &path, eFragmentIonType startiontype, int startmodifID, int endmodifID, int middlemodifID, int middlepos)
Set a peptide sequence candidate.
Definition: cCandidate.cpp:204
void getRotations(vector< string > &rotations, bool includerevertedrotations)
Get rotations of a cyclic peptide sequence.
Definition: cCandidate.cpp:966
bool hasFirstBrickArtificial(cBricksDatabase &brickdatabasewithcombinations)
Check if the first brick is artificial.
Definition: cCandidate.cpp:930
The class representing a set of peptide sequence candidates.
Definition: cCandidateSet.h:18
The class implementing the de novo graph.
Definition: cDeNovoGraph.h:46
The class storing parameters of the application.
Definition: cParameters.h:82
An auxiliary structure representing a branch permutation of a branched peptide.
Definition: cCandidate.h:30
int startmodifID
Id of a terminal modification (at the beginning of a spectrum).
Definition: cCandidate.h:59
vector< int > bricks
Vector of ids of bricks.
Definition: cCandidate.h:41
string tcomposition
Ids of bricks separated by '-', the branch is specified by '(' and ')'; example: 1-2-3(4-5)6-7.
Definition: cCandidate.h:77
int middlebranchend
Position of a brick where a branch of a branched peptide ends.
Definition: cCandidate.h:53
int middlebranchstart
Position of a brick where a branch of a branched peptide starts.
Definition: cCandidate.h:47
bool endsWithBracket()
Test whether tcomposition ends with a bracket.
Definition: cCandidate.h:118
void clear()
Clear the structure.
Definition: cCandidate.h:91
bool startsWithBracket()
Test whether tcomposition starts with a bracket.
Definition: cCandidate.h:107
int id
Id of the rotation.
Definition: cCandidate.h:35
TRotationInfo()
The constructor.
Definition: cCandidate.h:83
int endmodifID
Id of a terminal modification (at the end of a spectrum).
Definition: cCandidate.h:65
int middlemodifID
Id of a terminal modification of a branched peptide (in the middle of a spectrum).
Definition: cCandidate.h:71
The structure defining a hash function of cCandidate.
Definition: cCandidate.h:648
size_t operator()(const cCandidate &candidate) const
Hash a peptide sequence candidate.
Definition: cCandidate.h:655
ePeptideType
The types of peptides supported by the application.
Definition: utilities.h:104