CycloBranch
|
The class representing a peptide sequence candidate. More...
#include <cCandidate.h>
Public Member Functions | |
cCandidate () | |
The default constructor. | |
cCandidate (vector< string > &composition, vector< nodeEdge > &path, eFragmentIonType startiontype, int startmodifID, int endmodifID, int middlemodifID, int middlepos) | |
The constructor. More... | |
cCandidate (vector< string > &composition, vector< nodeEdge > &path, eFragmentIonType startiontype, int startmodifID, int endmodifID, int middlemodifID, int branchstart, int branchend) | |
The constructor. More... | |
void | setCandidate (vector< string > &composition, vector< nodeEdge > &path, eFragmentIonType startiontype, int startmodifID, int endmodifID, int middlemodifID, int middlepos) |
Set a peptide sequence candidate. More... | |
void | setCandidate (vector< string > &composition, vector< nodeEdge > &path, eFragmentIonType startiontype, int startmodifID, int endmodifID, int middlemodifID, int branchstart, int branchend) |
Set a peptide sequence candidate. More... | |
void | clear () |
Clear the candidate. | |
string & | getComposition () |
Access to the composition of the peptide sequence candidate. More... | |
void | revertComposition () |
Reverse the bricks composition of the candidate. | |
void | prepareBranchedCandidates (cCandidateSet &result, ePeptideType peptidetype, bool *terminatecomputation) |
Prepare candidates of a branched or a branch-cyclic peptide. More... | |
string | getTComposition () |
Get a T-composition of a branched peptide. More... | |
string | getRevertedTComposition (bool usebrackets) |
Get a reverted T-composition of a branched peptide. More... | |
string | getAcronymsTComposition (cBricksDatabase &brickdatabase) |
Get a T-composition of a branched peptide composed from acronyms of bricks. More... | |
string | getRealNameTComposition (cBricksDatabase &brickdatabase) |
Get a T-composition of a branched peptide composed from real names of bricks. More... | |
int | getBranchSize () |
Get a number of blocks forming a branch. More... | |
int | getBranchStart () |
Get starting position of a branch. More... | |
int | getBranchEnd () |
Get end position of a branch. More... | |
void | getPermutationsOfBranches (vector< TRotationInfo > &tpermutations) |
Get permutations of branches a branched peptide. More... | |
double | calculatePrecursorMassFromBricks (cBricksDatabase &brickdatabasewithcombinations, cParameters *parameters) |
Calculate the precursor mass of the peptide sequence candidate from bricks. More... | |
bool | isEqualTo (cCandidate &candidate) |
Compare two candidates. More... | |
void | getPermutations (cCandidateSet &permutations, bool *terminatecomputation) |
Get a set of candidates with permutations of bricks. More... | |
int | getStartModifID () |
Get id of a terminal modification (at the beginning of a spectrum). More... | |
void | setStartModifID (int id) |
Set id of a terminal modification (at the beginning of a spectrum). More... | |
int | getEndModifID () |
Get id of a terminal modification (at the end of a spectrum). More... | |
void | setEndModifID (int id) |
Set id of a terminal modification (at the end of a spectrum). More... | |
int | getMiddleModifID () |
Get id of a terminal modification of a branched peptide (in the middle of a spectrum). More... | |
void | setMiddleModifID (int id) |
Set id of a terminal modification of a branched peptide (in the middle of a spectrum). More... | |
bool | compare (cCandidate &candidate) |
Compare two candidates. More... | |
vector< nodeEdge > & | getPath () |
Get a path in the de novo graph corresponding to the peptide sequence candidate. More... | |
bool | hasEqualTPermutations (cCandidate &candidate) |
compare TPermutations of two candidates. More... | |
bool | hasOnlyArtificialBricks (cBricksDatabase &brickdatabasewithcombinations) |
Check whether the candidate is composed exclusively from artificial bricks. More... | |
bool | hasFirstBrickArtificial (cBricksDatabase &brickdatabasewithcombinations) |
Check if the first brick is artificial. More... | |
bool | hasLastBrickArtificial (cBricksDatabase &brickdatabasewithcombinations) |
Check if the last brick is artificial. More... | |
bool | hasLastBrickInvalid (cBricksDatabase &brickdatabasewithcombinations) |
Check if the last brick is invalid. More... | |
void | getRotations (vector< string > &rotations, bool includerevertedrotations) |
Get rotations of a cyclic peptide sequence. More... | |
void | getBranchCyclicRotations (vector< cCandidate > &branchcyclicrotations, bool includerevertedrotations) |
Get branch-cyclic rotations of a branch-cyclic peptide sequence. More... | |
cSummaryFormula | calculateSummaryFormulaFromBricks (cParameters ¶meters, ePeptideType peptidetype, double precursormass=0) |
Calculate the summary formula of the peptide sequence candidate. More... | |
cSummaryFormula & | getSummaryFormula () |
Get the summary formula of the peptide sequence candidate. More... | |
void | setSummaryFormula (cSummaryFormula &summary) |
Set the summary formula of the peptide sequence candidate. More... | |
void | store (ofstream &os) |
Store the structure into an output stream. More... | |
void | load (ifstream &is) |
Load the structure from an input stream. More... | |
void | setName (string &name) |
Set the name of peptide. More... | |
string & | getName () |
Get the name of peptide. More... | |
void | setAcronyms (cBricksDatabase &bricksdatabase) |
Set a vector of acronyms corresponding to a peptide sequence candidate. More... | |
void | setBackboneAcronyms (cBricksDatabase &bricksdatabase) |
Set a vector of acronyms corresponding to a backbone of a peptide sequence candidate. More... | |
void | setBranchAcronyms (cBricksDatabase &bricksdatabase) |
Set a vector of acronyms corresponding to a branch of a peptide sequence candidate. More... | |
vector< string > & | getAcronyms () |
Get a vector of acronyms corresponding to a peptide sequence candidate. More... | |
vector< string > & | getBackboneAcronyms () |
Get a vector of acronyms corresponding to a backbone of a peptide sequence candidate. More... | |
vector< string > & | getBranchAcronyms () |
Get a vector of acronyms corresponding to a branch of a peptide sequence candidate. More... | |
void | setPath (cDeNovoGraph &graph, cParameters *parameters) |
Set a path in the de novo graph corresponding to the candidate. More... | |
string & | getPathAsString () |
Get a path in the de novo graph corresponding to the candidate as a string. More... | |
void | setRealPeptideName (cBricksDatabase &bricksdatabase, ePeptideType peptidetype) |
Set a real peptide name. More... | |
void | setAcronymPeptideNameWithHTMLReferences (cBricksDatabase &bricksdatabase, ePeptideType peptidetype) |
Set an acronym peptide name. More... | |
string & | getRealPeptideName () |
Get a real peptide name. More... | |
string & | getAcronymPeptideNameWithHTMLReferences () |
Get an acronym peptide name. More... | |
void | setStartIonType (eFragmentIonType iontype) |
Set start ion type used in the de novo graph. More... | |
eFragmentIonType | getStartIonType () |
Get start ion type used in the de novo graph. More... | |
bool | checkKetideSequence (cBricksDatabase &bricksdatabase, ePeptideType peptidetype, bool regularblocksorder) |
Check if the order of blocks is correct. More... | |
eResidueLossType | getLeftResidueType (cBricksDatabase &bricksdatabase) |
Get the residue type of the left-most building block. More... | |
eResidueLossType | getRightResidueType (cBricksDatabase &bricksdatabase) |
Get the residue type of the right-most building block. More... | |
bool | checkKetideBlocks (cBricksDatabase &bricksdatabase, ePeptideType peptidetype, bool regularblocksorder) |
Check if the numbers of H2 loss and H2O loss blocks are correct. More... | |
The class representing a peptide sequence candidate.
cCandidate::cCandidate | ( | vector< string > & | composition, |
vector< nodeEdge > & | path, | ||
eFragmentIonType | startiontype, | ||
int | startmodifID, | ||
int | endmodifID, | ||
int | middlemodifID, | ||
int | middlepos | ||
) |
The constructor.
composition | reference to a vector of strings where each string is a sequence of ids of bricks separated by '-' (each string corresponds to an edge in the de novo graph) |
path | reference to a path in the de novo graph which corresponds to a peptide sequence candidate |
startiontype | start ion type in the de novo graph |
startmodifID | id of a terminal modification (at the beginning of a spectrum) |
endmodifID | id of a terminal modification (at the end of a spectrum) |
middlemodifID | id of a terminal modification of a branched peptide (in the middle of a spectrum) |
middlepos | position in composition corresponding to a branch of a branched peptide |
cCandidate::cCandidate | ( | vector< string > & | composition, |
vector< nodeEdge > & | path, | ||
eFragmentIonType | startiontype, | ||
int | startmodifID, | ||
int | endmodifID, | ||
int | middlemodifID, | ||
int | branchstart, | ||
int | branchend | ||
) |
The constructor.
composition | reference to a vector of strings where each string is a sequence of ids of bricks separated by '-' (each string corresponds to an edge in the de novo graph) |
path | reference to a path in the de novo graph which corresponds to a peptide sequence candidate |
startiontype | start ion type in the de novo graph |
startmodifID | id of a terminal modification (at the beginning of a spectrum) |
endmodifID | id of a terminal modification (at the end of a spectrum) |
middlemodifID | id of a terminal modification of a branched peptide (in the middle of a spectrum) |
branchstart | position of a brick where a branch of a branched peptide starts (it is assumed that all strings in composition are concatenated) |
branchend | position of a brick where a branch of a branched peptide ends (it is assumed that all strings in composition are concatenated) |
double cCandidate::calculatePrecursorMassFromBricks | ( | cBricksDatabase & | brickdatabasewithcombinations, |
cParameters * | parameters | ||
) |
Calculate the precursor mass of the peptide sequence candidate from bricks.
brickdatabasewithcombinations | reference to an input database of bricks with combinations of bricks |
parameters | a pointer to the parameters of the application |
double | precursor mass of the candidate |
cSummaryFormula cCandidate::calculateSummaryFormulaFromBricks | ( | cParameters & | parameters, |
ePeptideType | peptidetype, | ||
double | precursormass = 0 |
||
) |
Calculate the summary formula of the peptide sequence candidate.
parameters | a reference to the parameters of the application |
peptidetype | the type of peptide |
precursormass | experimantal precursor mass |
string | summary formula |
bool cCandidate::checkKetideBlocks | ( | cBricksDatabase & | bricksdatabase, |
ePeptideType | peptidetype, | ||
bool | regularblocksorder | ||
) |
Check if the numbers of H2 loss and H2O loss blocks are correct.
bricksdatabase | a database of building blocks |
peptidetype | the type of peptide |
regularblocksorder | check regular order of ketide blocks |
bool | true when the numbers of blocks are correct |
bool cCandidate::checkKetideSequence | ( | cBricksDatabase & | bricksdatabase, |
ePeptideType | peptidetype, | ||
bool | regularblocksorder | ||
) |
Check if the order of blocks is correct.
bricksdatabase | a database of building blocks |
peptidetype | the type of peptide |
regularblocksorder | check regular order of ketide blocks |
bool | true when the order of blocks is correct; false otherwise |
bool cCandidate::compare | ( | cCandidate & | candidate | ) |
Compare two candidates.
candidate | reference to the other candidate |
bool | true when the other candidate is greater |
string & cCandidate::getAcronymPeptideNameWithHTMLReferences | ( | ) |
Get an acronym peptide name.
string | reference to the acronym peptide name |
vector< string > & cCandidate::getAcronyms | ( | ) |
Get a vector of acronyms corresponding to a peptide sequence candidate.
vector<string> | a vector of acronyms |
string cCandidate::getAcronymsTComposition | ( | cBricksDatabase & | brickdatabase | ) |
Get a T-composition of a branched peptide composed from acronyms of bricks.
brickdatabase | reference to the database of bricks |
string | containing acronyms of bricks separated by '-', the branch is specified by '(' and ')' |
vector< string > & cCandidate::getBackboneAcronyms | ( | ) |
Get a vector of acronyms corresponding to a backbone of a peptide sequence candidate.
vector<string> | a vector of acronyms |
vector< string > & cCandidate::getBranchAcronyms | ( | ) |
Get a vector of acronyms corresponding to a branch of a peptide sequence candidate.
vector<string> | a vector of acronyms |
void cCandidate::getBranchCyclicRotations | ( | vector< cCandidate > & | branchcyclicrotations, |
bool | includerevertedrotations | ||
) |
Get branch-cyclic rotations of a branch-cyclic peptide sequence.
branchcyclicrotations | reference to an output vector containing branch-cyclic rotations of a sequence |
includerevertedrotations | if true then reverted branch-cyclic rotations are also included |
int cCandidate::getBranchEnd | ( | ) |
Get end position of a branch.
int | end position of a branch |
int cCandidate::getBranchSize | ( | ) |
Get a number of blocks forming a branch.
int | number of blocks |
int cCandidate::getBranchStart | ( | ) |
Get starting position of a branch.
int | starting position of a branch |
string & cCandidate::getComposition | ( | ) |
Access to the composition of the peptide sequence candidate.
reference | to a string of ids of bricks separated by '-' |
int cCandidate::getEndModifID | ( | ) |
Get id of a terminal modification (at the end of a spectrum).
int | id of a terminal modification |
eResidueLossType cCandidate::getLeftResidueType | ( | cBricksDatabase & | bricksdatabase | ) |
Get the residue type of the left-most building block.
bricksdatabase | a database of building blocks |
eResidueLossType | residue loss type of the left-most building block |
int cCandidate::getMiddleModifID | ( | ) |
Get id of a terminal modification of a branched peptide (in the middle of a spectrum).
int | id of a terminal modification |
string & cCandidate::getName | ( | ) |
Get the name of peptide.
string | name |
vector< nodeEdge > & cCandidate::getPath | ( | ) |
Get a path in the de novo graph corresponding to the peptide sequence candidate.
vector<nodeEdge> | vector of pairs node and edge |
string & cCandidate::getPathAsString | ( | ) |
Get a path in the de novo graph corresponding to the candidate as a string.
string | reference to a path corresponding to the spectrum |
void cCandidate::getPermutations | ( | cCandidateSet & | permutations, |
bool * | terminatecomputation | ||
) |
Get a set of candidates with permutations of bricks.
permutations | reference to an output set of candidates |
terminatecomputation | pointer to a variable determining that the computation must be stopped |
void cCandidate::getPermutationsOfBranches | ( | vector< TRotationInfo > & | tpermutations | ) |
Get permutations of branches a branched peptide.
tpermutations | reference to an output vector of auxiliary structures where permutations will be stored |
string cCandidate::getRealNameTComposition | ( | cBricksDatabase & | brickdatabase | ) |
Get a T-composition of a branched peptide composed from real names of bricks.
brickdatabase | reference to the database of bricks |
string | containing real names of bricks separated by '-', the branch is specified by '(' and ')' |
string & cCandidate::getRealPeptideName | ( | ) |
Get a real peptide name.
string | reference to the real peptide name |
string cCandidate::getRevertedTComposition | ( | bool | usebrackets | ) |
Get a reverted T-composition of a branched peptide.
usebrackets | if true then the branch is separated by '(' and ')' else '-' is used instead of brackets |
string | containing ids of bricks separated by '-', the branch may be specified by '(' and ')'; example: 1-2-3(4-5)6-7 |
eResidueLossType cCandidate::getRightResidueType | ( | cBricksDatabase & | bricksdatabase | ) |
Get the residue type of the right-most building block.
bricksdatabase | a database of building blocks |
eResidueLossType | residue loss type of the right-most building block |
void cCandidate::getRotations | ( | vector< string > & | rotations, |
bool | includerevertedrotations | ||
) |
Get rotations of a cyclic peptide sequence.
rotations | reference to an output vector containing rotations of a sequence |
includerevertedrotations | if true then reverted rotations are also included |
eFragmentIonType cCandidate::getStartIonType | ( | ) |
Get start ion type used in the de novo graph.
eFragmentIonType | fragment ion type |
int cCandidate::getStartModifID | ( | ) |
Get id of a terminal modification (at the beginning of a spectrum).
int | id of a terminal modification |
cSummaryFormula & cCandidate::getSummaryFormula | ( | ) |
Get the summary formula of the peptide sequence candidate.
cSummaryFormula | summary formula |
string cCandidate::getTComposition | ( | ) |
Get a T-composition of a branched peptide.
string | containing ids of bricks separated by '-', the branch is specified by '(' and ')'; example: 1-2-3(4-5)6-7 |
bool cCandidate::hasEqualTPermutations | ( | cCandidate & | candidate | ) |
compare TPermutations of two candidates.
candidate | reference to the second candidate |
true | when candidates have equal TPermutations |
bool cCandidate::hasFirstBrickArtificial | ( | cBricksDatabase & | brickdatabasewithcombinations | ) |
Check if the first brick is artificial.
brickdatabasewithcombinations | reference to an input database of bricks with combinations of bricks |
bool | true if the first brick is artificial, false otherwise |
bool cCandidate::hasLastBrickArtificial | ( | cBricksDatabase & | brickdatabasewithcombinations | ) |
Check if the last brick is artificial.
brickdatabasewithcombinations | reference to an input database of bricks with combinations of bricks |
bool | true if the last brick is artificial, false otherwise |
bool cCandidate::hasLastBrickInvalid | ( | cBricksDatabase & | brickdatabasewithcombinations | ) |
Check if the last brick is invalid.
brickdatabasewithcombinations | reference to an input database of bricks with combinations of bricks |
bool | true if the last brick is invalid, false otherwise |
bool cCandidate::hasOnlyArtificialBricks | ( | cBricksDatabase & | brickdatabasewithcombinations | ) |
Check whether the candidate is composed exclusively from artificial bricks.
brickdatabasewithcombinations | reference to an input database of bricks with combinations of bricks |
bool | true when the candidate is composed exclusively from artificial bricks; false when the candidate constains a regular brick |
bool cCandidate::isEqualTo | ( | cCandidate & | candidate | ) |
Compare two candidates.
candidate | reference to the other candidate |
bool | true when the candidates are equal |
void cCandidate::load | ( | ifstream & | is | ) |
Load the structure from an input stream.
is | an input stream |
void cCandidate::prepareBranchedCandidates | ( | cCandidateSet & | result, |
ePeptideType | peptidetype, | ||
bool * | terminatecomputation | ||
) |
Prepare candidates of a branched or a branch-cyclic peptide.
result | reference to an output set of possible peptide sequence candidates |
peptidetype | a type of an analyzed peptide |
terminatecomputation | pointer to a variable determining that the computation must be stopped |
void cCandidate::setAcronymPeptideNameWithHTMLReferences | ( | cBricksDatabase & | bricksdatabase, |
ePeptideType | peptidetype | ||
) |
Set an acronym peptide name.
bricksdatabase | the database of building blocks |
peptidetype | the type of peptide |
void cCandidate::setAcronyms | ( | cBricksDatabase & | bricksdatabase | ) |
Set a vector of acronyms corresponding to a peptide sequence candidate.
bricksdatabase | a database of building blocks |
void cCandidate::setBackboneAcronyms | ( | cBricksDatabase & | bricksdatabase | ) |
Set a vector of acronyms corresponding to a backbone of a peptide sequence candidate.
bricksdatabase | a database of building blocks |
void cCandidate::setBranchAcronyms | ( | cBricksDatabase & | bricksdatabase | ) |
Set a vector of acronyms corresponding to a branch of a peptide sequence candidate.
bricksdatabase | a database of building blocks |
void cCandidate::setCandidate | ( | vector< string > & | composition, |
vector< nodeEdge > & | path, | ||
eFragmentIonType | startiontype, | ||
int | startmodifID, | ||
int | endmodifID, | ||
int | middlemodifID, | ||
int | branchstart, | ||
int | branchend | ||
) |
Set a peptide sequence candidate.
composition | reference to a vector of strings where each string is a sequence of ids of bricks separated by '-' (each string corresponds to an edge in the de novo graph) |
path | reference to a path in the de novo graph which corresponds to a peptide sequence candidate |
startiontype | start ion type in the de novo graph |
startmodifID | id of a terminal modification (at the beginning of a spectrum) |
endmodifID | id of a terminal modification (at the end of a spectrum) |
middlemodifID | id of a terminal modification of a branched peptide (in the middle of a spectrum) |
branchstart | position of a brick where a branch of a branched peptide starts (it is assumed that all strings in composition are concatenated) |
branchend | position of a brick where a branch of a branched peptide ends (it is assumed that all strings in composition are concatenated) |
void cCandidate::setCandidate | ( | vector< string > & | composition, |
vector< nodeEdge > & | path, | ||
eFragmentIonType | startiontype, | ||
int | startmodifID, | ||
int | endmodifID, | ||
int | middlemodifID, | ||
int | middlepos | ||
) |
Set a peptide sequence candidate.
composition | reference to a vector of strings where each string is a sequence of ids of bricks separated by '-' (each string corresponds to an edge in the de novo graph) |
path | reference to a path in the de novo graph which corresponds to a peptide sequence candidate |
startiontype | start ion type in the de novo graph |
startmodifID | id of a terminal modification (at the beginning of a spectrum) |
endmodifID | id of a terminal modification (at the end of a spectrum) |
middlemodifID | id of a terminal modification of a branched peptide (in the middle of a spectrum) |
middlepos | position in composition corresponding to a branch of a branched peptide |
void cCandidate::setEndModifID | ( | int | id | ) |
Set id of a terminal modification (at the end of a spectrum).
id | of a terminal modification |
void cCandidate::setMiddleModifID | ( | int | id | ) |
Set id of a terminal modification of a branched peptide (in the middle of a spectrum).
id | of a terminal modification |
void cCandidate::setName | ( | string & | name | ) |
Set the name of peptide.
name | name |
void cCandidate::setPath | ( | cDeNovoGraph & | graph, |
cParameters * | parameters | ||
) |
Set a path in the de novo graph corresponding to the candidate.
graph | reference to the de novo graph |
parameters | parameters of the application |
void cCandidate::setRealPeptideName | ( | cBricksDatabase & | bricksdatabase, |
ePeptideType | peptidetype | ||
) |
Set a real peptide name.
bricksdatabase | the database of building blocks |
peptidetype | the type of peptide |
void cCandidate::setStartIonType | ( | eFragmentIonType | iontype | ) |
Set start ion type used in the de novo graph.
iontype | fragment ion type |
void cCandidate::setStartModifID | ( | int | id | ) |
Set id of a terminal modification (at the beginning of a spectrum).
id | of a terminal modification |
void cCandidate::setSummaryFormula | ( | cSummaryFormula & | summary | ) |
Set the summary formula of the peptide sequence candidate.
summary | summary formula |
void cCandidate::store | ( | ofstream & | os | ) |
Store the structure into an output stream.
os | an output stream |