OpenMS
ModifiedNASequenceGenerator.h
Go to the documentation of this file.
1 // Copyright (c) 2002-2023, The OpenMS Team -- EKU Tuebingen, ETH Zurich, and FU Berlin
2 // SPDX-License-Identifier: BSD-3-Clause
3 //
4 // --------------------------------------------------------------------------
5 // $Maintainer: Timo Sachsenberg $
6 // $Authors: Timo Sachsenberg $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
14 #include <vector>
15 #include <map>
16 #include <set>
17 
18 namespace OpenMS
19 {
20  /*
21  * @brief This class applies fixed and variable modifications to (unmodified)
22  * nucleic acid sequences, combinatorically generating modified sequences.
23  *
24  */
25  class OPENMS_DLLAPI ModifiedNASequenceGenerator
26  {
27  public:
29 
32  const std::set<ConstRibonucleotidePtr>& fixed_mods,
33  NASequence& sequence);
34 
37  const std::set<ConstRibonucleotidePtr>& var_mods,
38  const NASequence& seq, Size max_variable_mods_per_NASequence,
39  std::vector<NASequence>& all_modified_NASequences,
40  bool keep_original = true);
41 
42  protected:
45  const std::vector<int>& subset_indices,
46  const std::map<int, std::vector<ConstRibonucleotidePtr>>& map_compatibility,
47  int depth,
48  const NASequence& current_NASequence,
49  std::vector<NASequence>& modified_NASequences);
50 
55  const std::set<ConstRibonucleotidePtr>& var_mods,
56  const NASequence& seq,
57  std::vector<NASequence>& all_modified_NASequences,
58  bool keep_original = true);
59  };
60 }
61 
Definition: ModifiedNASequenceGenerator.h:26
static void applyFixedModifications(const std::set< ConstRibonucleotidePtr > &fixed_mods, NASequence &sequence)
Applies fixed modifications to a single NASequence.
static void recurseAndGenerateVariableModifiedSequences_(const std::vector< int > &subset_indices, const std::map< int, std::vector< ConstRibonucleotidePtr >> &map_compatibility, int depth, const NASequence &current_NASequence, std::vector< NASequence > &modified_NASequences)
Recursively generate all combinatorial placements at compatible sites.
static void applyAtMostOneVariableModification_(const std::set< ConstRibonucleotidePtr > &var_mods, const NASequence &seq, std::vector< NASequence > &all_modified_NASequences, bool keep_original=true)
static void applyVariableModifications(const std::set< ConstRibonucleotidePtr > &var_mods, const NASequence &seq, Size max_variable_mods_per_NASequence, std::vector< NASequence > &all_modified_NASequences, bool keep_original=true)
Applies variable modifications to a single NASequence. If keep_original is set the original (e....
Representation of a nucleic acid sequence.
Definition: NASequence.h:34
Representation of a ribonucleotide (modified or unmodified)
Definition: Ribonucleotide.h:26
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:101
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:22