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
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
47 std::set<ConstRibonucleotidePtr> combined() const
48 {
49 std::set<ConstRibonucleotidePtr> all = cuts_before_sensitive;
50 all.insert(cuts_after_sensitive.begin(), cuts_after_sensitive.end());
51 return all;
52 }
53 };
54
55
57 void setEnzyme(const DigestionEnzyme* enzyme) override;
58
60 void setEnzyme(const std::string& name);
61
67 void digest(const NASequence& rna, std::vector<NASequence>& output,
68 Size min_length = 0, Size max_length = 0) const;
69
81 void digest(const NASequence& rna, std::vector<DigestionProduct>& output,
82 Size min_length = 0, Size max_length = 0) const;
83
93 std::vector<std::pair<Size, Size>> getFragmentPositions(
94 const NASequence& rna, Size min_length = 0, Size max_length = 0) const;
95
105 const std::set<ConstRibonucleotidePtr>& variable_modifications) const;
106
124 const NASequence& rna,
125 const CleavageSensitiveModGroups& cleavage_sensitive_mods,
126 Size max_sensitive_mods_per_fragment,
127 std::vector<DigestionProduct>& output,
128 Size min_length = 0,
129 Size max_length = 0) const;
130
137 void digest(IdentificationData& id_data, Size min_length = 0,
138 Size max_length = 0) const;
139
140 protected:
143 std::vector<RegularExpression>
145 std::vector<RegularExpression> cuts_before_regexes_;
146
150 std::vector<std::pair<Size, Size>> getFragmentPositions_(
151 const NASequence& rna, Size min_length, Size max_length)
152 const;
153
156 const std::pair<Size, Size>& pos,
157 Size parent_size) const;
158 };
159
160} // namespace OpenMS
Base class for digestion enzymes.
Definition DigestionEnzyme.h:29
Class for the enzymatic digestion of sequences.
Definition EnzymaticDigestion.h:37
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< 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:141
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:142
void setEnzyme(const std::string &name)
Sets the enzyme for the digestion (by name)
std::vector< RegularExpression > cuts_after_regexes_
a vector of reg. exp. for enzyme cutting pattern, each regex represents a single nucleotide
Definition RNaseDigestion.h:144
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< RegularExpression > cuts_before_regexes_
a vector reg. exp. for enzyme cutting pattern
Definition RNaseDigestion.h:145
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
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
Return the union of modifications sensitive to either cleavage direction.
Definition RNaseDigestion.h:47