OpenMS
Loading...
Searching...
No Matches
RNaseDigestion.h
Go to the documentation of this file.
1// Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
2// SPDX-License-Identifier: BSD-3-Clause
3//
4// --------------------------------------------------------------------------
5// $Maintainer: Hendrik Weisser $
6// $Authors: Hendrik Weisser, Samuel Wein $
7// --------------------------------------------------------------------------
8
9#pragma once
10
14
15#include <boost/regex.hpp>
16
17#include <set>
18
19namespace OpenMS
20{
28 class OPENMS_DLLAPI RNaseDigestion: public EnzymaticDigestion
29 {
30 public:
32
35 {
37 std::pair<Size, Size> position;
38 };
39
42 {
43 std::set<ConstRibonucleotidePtr> cuts_before_sensitive;
44 std::set<ConstRibonucleotidePtr> cuts_after_sensitive;
45
46 std::set<ConstRibonucleotidePtr> combined() const
47 {
48 std::set<ConstRibonucleotidePtr> all = cuts_before_sensitive;
49 all.insert(cuts_after_sensitive.begin(), cuts_after_sensitive.end());
50 return all;
51 }
52 };
53
55 void setEnzyme(const DigestionEnzyme* enzyme) override;
56
58 void setEnzyme(const String& name);
59
65 void digest(const NASequence& rna, std::vector<NASequence>& output,
66 Size min_length = 0, Size max_length = 0) const;
67
74 void digest(const NASequence& rna, std::vector<DigestionProduct>& output,
75 Size min_length = 0, Size max_length = 0) const;
76
82 std::vector<std::pair<Size, Size>> getFragmentPositions(
83 const NASequence& rna, Size min_length = 0, Size max_length = 0) const;
84
92 const std::set<ConstRibonucleotidePtr>& variable_modifications) const;
93
103 const NASequence& rna,
104 const CleavageSensitiveModGroups& cleavage_sensitive_mods,
105 Size max_sensitive_mods_per_fragment,
106 std::vector<DigestionProduct>& output,
107 Size min_length = 0,
108 Size max_length = 0) const;
109
116 void digest(IdentificationData& id_data, Size min_length = 0,
117 Size max_length = 0) const;
118
119 protected:
122 std::vector<boost::regex> cuts_after_regexes_;
123 std::vector<boost::regex> cuts_before_regexes_;
124
128 std::vector<std::pair<Size, Size>> getFragmentPositions_(
129 const NASequence& rna, Size min_length, Size max_length)
130 const;
131
134 const std::pair<Size, Size>& pos,
135 Size parent_size) const;
136 };
137
138} // namespace OpenMS
139
Base class for digestion enzymes.
Definition DigestionEnzyme.h:29
Class for the enzymatic digestion of sequences.
Definition EnzymaticDigestion.h:38
Definition IdentificationData.h:87
Representation of a nucleic acid sequence.
Definition NASequence.h:36
Class for the enzymatic digestion of RNAs.
Definition RNaseDigestion.h:29
NASequence fragment
Definition RNaseDigestion.h:36
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.
void applyTerminalGains_(NASequence &fragment, const std::pair< Size, Size > &pos, Size parent_size) const
Apply enzyme-specific 5'/3' terminal gains to a fragment based on its parent coordinates.
std::vector< boost::regex > cuts_before_regexes_
a vector reg. exp. for enzyme cutting pattern
Definition RNaseDigestion.h:123
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)
const Ribonucleotide * five_prime_gain_
5' mod added by the enzyme
Definition RNaseDigestion.h:120
void digest(const NASequence &rna, std::vector< DigestionProduct > &output, Size min_length=0, Size max_length=0) const
Performs the enzymatic digestion of a RNA and returns fragments with parent coordinates.
void digest(IdentificationData &id_data, Size min_length=0, Size max_length=0) const
Performs the enzymatic digestion of all RNA parent sequences in IdentificationData.
std::pair< Size, Size > position
Definition RNaseDigestion.h:37
void digestWithCleavageSensitiveMods(const NASequence &rna, const CleavageSensitiveModGroups &cleavage_sensitive_mods, Size max_sensitive_mods_per_fragment, std::vector< DigestionProduct > &output, Size min_length=0, Size max_length=0) const
Digest RNA while allowing cleavage-sensitive modifications to block adjacent cuts.
const Ribonucleotide * three_prime_gain_
3' mod added by the enzyme
Definition RNaseDigestion.h:121
std::vector< std::pair< Size, Size > > getFragmentPositions(const NASequence &rna, Size min_length=0, Size max_length=0) const
Returns the positions of digestion products in the RNA as pairs: (start, length)
std::vector< boost::regex > cuts_after_regexes_
a vector of reg. exp. for enzyme cutting pattern, each regex represents a single nucleotide
Definition RNaseDigestion.h:122
void setEnzyme(const String &name)
Sets the enzyme for the digestion (by name)
void setEnzyme(const DigestionEnzyme *enzyme) override
Sets the enzyme for the digestion.
CleavageSensitiveModGroups inferCleavageSensitiveMods(const std::set< ConstRibonucleotidePtr > &variable_modifications) const
Infer which variable modifications can block cleavage for the configured enzyme.
Detailed digestion product including sequence and parent coordinates.
Definition RNaseDigestion.h:35
Representation of a ribonucleotide (modified or unmodified)
Definition Ribonucleotide.h:28
A more convenient string class.
Definition String.h:32
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition Types.h:97
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
Cleavage-sensitive modification groups split by cleavage direction.
Definition RNaseDigestion.h:42
std::set< ConstRibonucleotidePtr > cuts_before_sensitive
Definition RNaseDigestion.h:43
std::set< ConstRibonucleotidePtr > cuts_after_sensitive
Definition RNaseDigestion.h:44
std::set< ConstRibonucleotidePtr > combined() const
Definition RNaseDigestion.h:46