OpenMS  2.7.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
RNaseDigestion Class Reference

Class for the enzymatic digestion of RNAs. More...

#include <OpenMS/CHEMISTRY/RNaseDigestion.h>

Inheritance diagram for RNaseDigestion:
[legend]
Collaboration diagram for RNaseDigestion:
[legend]

Public Member Functions

void setEnzyme (const DigestionEnzyme *enzyme) override
 Sets the enzyme for the digestion. More...
 
void setEnzyme (const String &name)
 Sets the enzyme for the digestion (by name) More...
 
void digest (const NASequence &rna, std::vector< NASequence > &output, Size min_length=0, Size max_length=0) const
 Performs the enzymatic digestion of a (potentially modified) RNA. More...
 
void digest (IdentificationData &id_data, Size min_length=0, Size max_length=0) const
 Performs the enzymatic digestion of all RNA parent molecules in IdentificationData. More...
 
- Public Member Functions inherited from EnzymaticDigestion
 EnzymaticDigestion ()
 Default constructor. More...
 
virtual ~EnzymaticDigestion ()
 Destructor. More...
 
Size getMissedCleavages () const
 Returns the number of missed cleavages for the digestion. More...
 
void setMissedCleavages (Size missed_cleavages)
 Sets the number of missed cleavages for the digestion (default is 0). This setting is ignored when log model is used. More...
 
String getEnzymeName () const
 Returns the enzyme for the digestion. More...
 
Specificity getSpecificity () const
 Returns the specificity for the digestion. More...
 
void setSpecificity (Specificity spec)
 Sets the specificity for the digestion (default is SPEC_FULL). More...
 
Size digestUnmodified (const StringView &sequence, std::vector< StringView > &output, Size min_length=1, Size max_length=0) const
 Performs the enzymatic digestion of an unmodified sequence. More...
 
Size digestUnmodified (const StringView &sequence, std::vector< std::pair< Size, Size >> &output, Size min_length=1, Size max_length=0) const
 Performs the enzymatic digestion of an unmodified sequence. More...
 
bool isValidProduct (const String &sequence, int pos, int length, bool ignore_missed_cleavages=true) const
 Is the peptide fragment starting at position pos with length length within the sequence sequence generated by the current enzyme? More...
 
bool filterByMissedCleavages (const String &sequence, const std::function< bool(const Int)> &filter) const
 Filter based on the number of missed cleavages. More...
 

Protected Member Functions

std::vector< std::pair< Size, Size > > getFragmentPositions_ (const NASequence &rna, Size min_length, Size max_length) const
 Returns the positions of digestion products in the RNA as pairs: (start, length) More...
 
- Protected Member Functions inherited from EnzymaticDigestion
bool isValidProduct_ (const String &sequence, int pos, int length, bool ignore_missed_cleavages, bool allow_nterm_protein_cleavage, bool allow_random_asp_pro_cleavage) const
 supports functionality for ProteaseDigestion as well (which is deeply weaved into the function) To avoid code duplication, this is stored here and called by wrappers. Do not duplicate the code, just for the sake of semantics (unless we can come up with a clean separation) Note: the overhead of allow_nterm_protein_cleavage and allow_random_asp_pro_cleavage is marginal; the main runtime is spend during tokenize_() More...
 
std::vector< int > tokenize_ (const String &sequence, int start=0, int end=-1) const
 Digests the sequence using the enzyme's regular expression. More...
 
Size digestAfterTokenize_ (const std::vector< int > &fragment_positions, const StringView &sequence, std::vector< StringView > &output, Size min_length=0, Size max_length=-1) const
 Helper function for digestUnmodified() More...
 
Size digestAfterTokenize_ (const std::vector< int > &fragment_positions, const StringView &sequence, std::vector< std::pair< Size, Size >> &output, Size min_length=0, Size max_length=-1) const
 
Size countMissedCleavages_ (const std::vector< int > &cleavage_positions, Size seq_start, Size seq_end) const
 Counts the number of missed cleavages in a sequence fragment. More...
 

Protected Attributes

const Ribonucleotidefive_prime_gain_
 5' mod added by the enzyme More...
 
const Ribonucleotidethree_prime_gain_
 3' mod added by the enzyme More...
 
std::vector< boost::regex > cuts_after_regexes_
 a vector of reg. exp. for enzyme cutting pattern More...
 
std::vector< boost::regex > cuts_before_regexes_
 a vector reg. exp. for enzyme cutting pattern More...
 
- Protected Attributes inherited from EnzymaticDigestion
Size missed_cleavages_
 Number of missed cleavages. More...
 
const DigestionEnzymeenzyme_
 Used enzyme. More...
 
boost::regex re_
 Regex for tokenizing (huge speedup by making this a member instead of stack object in tokenize_()) More...
 
Specificity specificity_
 specificity of enzyme More...
 

Additional Inherited Members

- Public Types inherited from EnzymaticDigestion
enum  Specificity {
  SPEC_NONE = 0 , SPEC_SEMI = 1 , SPEC_FULL = 2 , SPEC_UNKNOWN = 3 ,
  SPEC_NOCTERM = 8 , SPEC_NONTERM = 9 , SIZE_OF_SPECIFICITY = 10
}
 when querying for valid digestion products, this determines if the specificity of the two peptide ends is considered important More...
 
- Static Public Member Functions inherited from EnzymaticDigestion
static Specificity getSpecificityByName (const String &name)
 
- Static Public Attributes inherited from EnzymaticDigestion
static const std::string NamesOfSpecificity [SIZE_OF_SPECIFICITY]
 Names of the Specificity. More...
 
static const std::string NoCleavage
 Name for no cleavage. More...
 
static const std::string UnspecificCleavage
 Name for unspecific cleavage. More...
 

Detailed Description

Class for the enzymatic digestion of RNAs.

See also
DigestionEnzymeRNA

Member Function Documentation

◆ digest() [1/2]

void digest ( const NASequence rna,
std::vector< NASequence > &  output,
Size  min_length = 0,
Size  max_length = 0 
) const

Performs the enzymatic digestion of a (potentially modified) RNA.

Only fragments of appropriate length (between min_length and max_length) are returned.

Referenced by NucleicAcidSearchEngine::main_().

◆ digest() [2/2]

void digest ( IdentificationData id_data,
Size  min_length = 0,
Size  max_length = 0 
) const

Performs the enzymatic digestion of all RNA parent molecules in IdentificationData.

Digestion products are stored as IdentifiedOligos with corresponding MoleculeParentMatch annotations. Only fragments of appropriate length (between min_length and max_length) are included.

◆ getFragmentPositions_()

std::vector<std::pair<Size, Size> > getFragmentPositions_ ( const NASequence rna,
Size  min_length,
Size  max_length 
) const
protected

Returns the positions of digestion products in the RNA as pairs: (start, length)

◆ setEnzyme() [1/2]

void setEnzyme ( const DigestionEnzyme enzyme)
overridevirtual

Sets the enzyme for the digestion.

Reimplemented from EnzymaticDigestion.

Referenced by NucleicAcidSearchEngine::main_().

◆ setEnzyme() [2/2]

void setEnzyme ( const String name)

Sets the enzyme for the digestion (by name)

Member Data Documentation

◆ cuts_after_regexes_

std::vector<boost::regex> cuts_after_regexes_
protected

a vector of reg. exp. for enzyme cutting pattern

◆ cuts_before_regexes_

std::vector<boost::regex> cuts_before_regexes_
protected

a vector reg. exp. for enzyme cutting pattern

◆ five_prime_gain_

const Ribonucleotide* five_prime_gain_
protected

5' mod added by the enzyme

◆ three_prime_gain_

const Ribonucleotide* three_prime_gain_
protected

3' mod added by the enzyme