libpappsomspp
Library for mass spectrometry
|
#include <enzyme.h>
Public Member Functions | |
Enzyme () | |
build the default enzyme (trypsin) with recognition_site = "([KR])([^P])" More... | |
Enzyme (const QString &recognition_site) | |
build any enzyme given a recognition_site More... | |
~Enzyme () | |
void | eat (std::int8_t sequence_database_id, const ProteinSp &protein_sp, bool is_decoy, EnzymeProductInterface &enzyme_product) const |
digest a protein into enzyme products More... | |
void | setMiscleavage (unsigned int miscleavage) |
sets the maximum number of missed cleavage allowed in the digestion More... | |
unsigned int | getMiscleavage () const |
get the maximum number of missed cleavage allowed in the digestion More... | |
void | setTakeOnlyFirstWildcard (bool take_only_first_wildcard) |
take only first m_takeOnlyFirstWildcard More... | |
void | setMaxPeptideVariantListSize (std::size_t max_peptide_variant_list_size) |
if there are wildcards in the protein sequence : restrict the number of possible peptide sequences More... | |
const QRegularExpression & | getQRegExpRecognitionSite () const |
Private Member Functions | |
void | sanityCheck (EnzymeProductInterface &enzyme_product, std::int8_t sequence_database_id, const ProteinSp &protein_sp, bool is_decoy, const PeptideStr &peptide, unsigned int start, bool is_nter, unsigned int missed_cleavage_number, bool semi_enzyme) const |
void | replaceWildcards (std::vector< std::string > *p_peptide_variant_list) const |
Private Attributes | |
QRegularExpression | m_recognitionSite |
example with a kinase == [K,R] More... | |
unsigned int | m_miscleavage = 0 |
bool | m_takeOnlyFirstWildcard = false |
std::size_t | m_maxPeptideVariantListSize = 100 |
std::vector< char > | m_wildCardX |
std::vector< char > | m_wildCardB |
std::vector< char > | m_wildCardZ |
pappso::Enzyme::Enzyme | ( | ) |
build the default enzyme (trypsin) with recognition_site = "([KR])([^P])"
Definition at line 32 of file enzyme.cpp.
References m_miscleavage, m_recognitionSite, m_wildCardB, m_wildCardX, and m_wildCardZ.
pappso::Enzyme::Enzyme | ( | const QString & | recognition_site | ) |
build any enzyme given a recognition_site
recognition_site | is a regular expression that must identify 2 motifs : one on Nter side one on Cter side |
Definition at line 49 of file enzyme.cpp.
References m_miscleavage, m_recognitionSite, m_wildCardB, m_wildCardX, and m_wildCardZ.
pappso::Enzyme::~Enzyme | ( | ) |
Definition at line 66 of file enzyme.cpp.
void pappso::Enzyme::eat | ( | std::int8_t | sequence_database_id, |
const ProteinSp & | protein_sp, | ||
bool | is_decoy, | ||
EnzymeProductInterface & | enzyme_product | ||
) | const |
digest a protein into enzyme products
sequence_database_id | integer that references the sequence fatabase (file, stream, url...) |
protein_sp | is the original protein to be digested |
is_decoy | tell if the current protein is a decoy (true) or normal (false) protein |
enzyme_product | is the object that will receive the digestion products |
Definition at line 87 of file enzyme.cpp.
References m_miscleavage, m_recognitionSite, and sanityCheck().
unsigned int pappso::Enzyme::getMiscleavage | ( | ) | const |
get the maximum number of missed cleavage allowed in the digestion
Definition at line 76 of file enzyme.cpp.
References m_miscleavage.
const QRegularExpression & pappso::Enzyme::getQRegExpRecognitionSite | ( | ) | const |
Definition at line 353 of file enzyme.cpp.
References m_recognitionSite.
|
private |
Definition at line 195 of file enzyme.cpp.
References m_wildCardB, m_wildCardX, and m_wildCardZ.
Referenced by sanityCheck().
|
private |
Definition at line 276 of file enzyme.cpp.
References m_maxPeptideVariantListSize, m_takeOnlyFirstWildcard, replaceWildcards(), and pappso::EnzymeProductInterface::setPeptide().
Referenced by eat().
void pappso::Enzyme::setMaxPeptideVariantListSize | ( | std::size_t | max_peptide_variant_list_size | ) |
if there are wildcards in the protein sequence : restrict the number of possible peptide sequences
max_peptide_variant_list_size | maximum number of peptide variant (default is 100) |
Definition at line 81 of file enzyme.cpp.
References m_maxPeptideVariantListSize.
void pappso::Enzyme::setMiscleavage | ( | unsigned int | miscleavage | ) |
sets the maximum number of missed cleavage allowed in the digestion
miscleavage | maximum number of missed cleavade to allow (defaults is 0) |
Definition at line 71 of file enzyme.cpp.
References m_miscleavage.
void pappso::Enzyme::setTakeOnlyFirstWildcard | ( | bool | take_only_first_wildcard | ) |
take only first m_takeOnlyFirstWildcard
bool | true : switch to take only the first possibility if there are X, B or Z wildcards in sequence |
Definition at line 269 of file enzyme.cpp.
References m_takeOnlyFirstWildcard.
|
private |
Definition at line 93 of file enzyme.h.
Referenced by sanityCheck(), and setMaxPeptideVariantListSize().
|
private |
Definition at line 90 of file enzyme.h.
Referenced by Enzyme(), eat(), getMiscleavage(), and setMiscleavage().
|
private |
example with a kinase == [K,R]
Definition at line 89 of file enzyme.h.
Referenced by Enzyme(), eat(), and getQRegExpRecognitionSite().
|
private |
Definition at line 91 of file enzyme.h.
Referenced by sanityCheck(), and setTakeOnlyFirstWildcard().
|
private |
Definition at line 97 of file enzyme.h.
Referenced by Enzyme(), and replaceWildcards().
|
private |
Definition at line 96 of file enzyme.h.
Referenced by Enzyme(), and replaceWildcards().
|
private |
Definition at line 98 of file enzyme.h.
Referenced by Enzyme(), and replaceWildcards().