LocARNA-2.0.0
aligner.hh
1 #ifndef LOCARNA_ALIGNER_HH
2 #define LOCARNA_ALIGNER_HH
3 
4 #ifdef HAVE_CONFIG_H
5 #include <config.h>
6 #endif
7 
8 #include <memory>
9 #include "aux.hh"
10 #include "scoring_fwd.hh"
11 #include "rna_structure.hh"
12 
13 #include "aligner_params.hh"
14 
15 namespace LocARNA {
16 
17  class AlignerImpl;
18 
19  class Sequence;
20  class AlignerParams;
21  class ArcMatches;
22  class Alignment;
23 
24  class AlignerRestriction;
25 
33  template <class T>
35  public:
41  bool
42  operator()(const T &a, const T &b) {
43  return a.second < b.second;
44  }
45  };
46 
67  class Aligner {
68  std::unique_ptr<AlignerImpl> pimpl_;
69 
70  public:
76  Aligner(const Aligner &aligner);
77 
83  Aligner &
84  operator=(const Aligner &aligner);
85 
94  Aligner(const AlignerParams &ap);
95 
97  ~Aligner();
98 
100  Alignment const &
101  get_alignment() const;
102 
111  void
112  set_alignment(const Alignment &alignment);
113 
116  align();
117 
119  void
120  trace();
121 
126  void
128 
133  const AlignerRestriction &
134  get_restriction() const;
135 
153  void
154  suboptimal(int k,
155  score_t threshold,
156  bool normalized,
157  score_t normalized_L,
158  size_t output_width,
159  bool verbose,
160  bool opt_local_out,
161  bool opt_pos_output,
162  bool opt_write_structure);
163 
166  normalized_align(score_t L, bool verbose);
167 
171  penalized_align(score_t position_penalty);
172 
179  score_t
181 
189  };
190 
191 } // end namespace LocARNA
192 
193 #endif // LOCARNA_ALIGNER_HH
Parameter for alignment by Aligner.
Definition: aligner_params.hh:49
Restricts range of an alignment in Aligner.
Definition: aligner_restriction.hh:26
Implements locarna alignment algorithm.
Definition: aligner.hh:67
score_t evaluate()
evaluate the alignment according to scoring and scoring parameters
Alignment const & get_alignment() const
return the alignment that was computed by trace()
Definition: aligner.cc:137
void set_restriction(const AlignerRestriction &r)
Definition: aligner.cc:1370
Aligner & operator=(const Aligner &aligner)
assignment operator
infty_score_t penalized_align(score_t position_penalty)
Definition: aligner.cc:1599
infty_score_t align()
compute the alignment score
Definition: aligner.cc:960
void trace()
offer trace as public method. Calls trace(def_scoring_view).
Definition: aligner.cc:1361
RnaStructure optimize_consensus_structure()
find optimum consensus structure
infty_score_t normalized_align(score_t L, bool verbose)
perform normalized local alignment with parameter L
Definition: aligner.cc:1522
~Aligner()
destructor
Definition: aligner.cc:76
Aligner(const Aligner &aligner)
copy constructor
Definition: aligner.cc:67
const AlignerRestriction & get_restriction() const
Definition: aligner.cc:1375
void set_alignment(const Alignment &alignment)
set the alignment
Definition: aligner.cc:142
void suboptimal(int k, score_t threshold, bool normalized, score_t normalized_L, size_t output_width, bool verbose, bool opt_local_out, bool opt_pos_output, bool opt_write_structure)
Enumerate suboptimal local alignments.
Definition: aligner.cc:1383
Represents a structure-annotated sequence alignment.
Definition: alignment.hh:83
Definition: infty_int.hh:325
An RNA secondary structure.
Definition: rna_structure.hh:32
Implements comparison by member second.
Definition: aligner.hh:34
bool operator()(const T &a, const T &b)
Definition: aligner.hh:42
Definition: aligner.cc:15
long int score_t
type of the locarna score as defined by the class Scoring
Definition: scoring_fwd.hh:13