LocARNA-1.8.11
rna_ensemble.hh
1 #ifndef LOCARNA_RNA_ENSEMBLE_HH
2 #define LOCARNA_RNA_ENSEMBLE_HH
3 
4 #ifdef HAVE_CONFIG_H
5 # include <config.h>
6 #endif
7 
8 #include <iosfwd>
9 
10 #include "aux.hh"
11 
12 namespace LocARNA {
13 
14  class MultipleAlignment;
15 
16  class RnaEnsembleImpl; // forward to implementation class
17 
18  class PFoldParams;
19 
40  class RnaEnsemble {
41  private:
42  RnaEnsembleImpl *pimpl_;
43  public:
44 
60  const PFoldParams &params,
61  bool inLoopProbs,
62  bool use_alifold=true);
63 
69  RnaEnsemble(const RnaEnsemble &rna_ensemble);
70 
76  RnaEnsemble &operator =(const RnaEnsemble &rna_ensemble);
77 
84  virtual
85  ~RnaEnsemble();
86 
92  bool
93  has_base_pair_probs() const;
94 
100  bool
101  has_stacking_probs() const;
102 
103 
109  bool
110  has_in_loop_probs() const;
111 
116  const MultipleAlignment &
117  multiple_alignment() const;
118 
123  size_type length() const;
124 
134  double
135  min_free_energy() const;
136 
146  std::string
148 
149  // ------------------------------------------------------------
150  // methods for base pair probabilities
151 
158  double
159  arc_prob(size_type i, size_type j) const;
160 
167  double
168  arc_2_prob(size_type i, size_type j) const;
169 
178  double arc_stack_prob(size_type i, size_type j) const;
179 
180 
181  // ------------------------------------------------------------
182  // compute probabilities paired upstream, downstream, and unpaired
183 
192  double
194 
203  double
205 
212  double
213  unpaired_prob(size_type i) const;
214 
215  // the following methods need linking to librna
216 
240  double
242  size_type i,
243  size_type j) const;
244 
262  double
264 
289  double
291  size_type jp,
292  size_type i,
293  size_type j) const;
294 
295 
314  double
316  size_type j) const;
317 
318  };
319 
320 }
321 
322 #endif // LOCARNA_RNA_ENSEMBLE_HH
RnaEnsemble & operator=(const RnaEnsemble &rna_ensemble)
assignment operator
bool has_in_loop_probs() const
Availability of "in loop" probabilities.
Definition: rna_ensemble.cc:60
double arc_2_prob(size_type i, size_type j) const
Get joint probability of stacked arcs.
Definition: rna_ensemble.cc:92
virtual ~RnaEnsemble()
Clean up.
Definition: rna_ensemble.cc:44
size_type length() const
get length of sequence
Definition: rna_ensemble.cc:82
double unpaired_in_loop_prob(size_type k, size_type i, size_type j) const
Unpaired probabilty of base in a specified loop.
Definition: rna_ensemble.cc:742
const MultipleAlignment & multiple_alignment() const
Get the sequence.
Definition: rna_ensemble.cc:65
double arc_external_prob(size_type i, size_type j) const
Probability of base pair in the external &#39;loop&#39;.
Definition: rna_ensemble.cc:1088
std::string min_free_energy_structure() const
get minimum free energy structure
Definition: rna_ensemble.cc:75
double arc_in_loop_prob(size_type ip, size_type jp, size_type i, size_type j) const
Probabilty of base pair in a specified loop.
Definition: rna_ensemble.cc:984
double arc_stack_prob(size_type i, size_type j) const
Get conditional propability that a base pair is stacked.
size_t size_type
general size type
Definition: aux.hh:94
double unpaired_prob(size_type i) const
Unpaired probability.
Definition: aligner.cc:17
double unpaired_external_prob(size_type k) const
Unpaired probabilty of base in external &#39;loop&#39;.
Definition: rna_ensemble.cc:854
RnaEnsemble(const MultipleAlignment &ma, const PFoldParams &params, bool inLoopProbs, bool use_alifold=true)
Construct from sequence or multiple alignment.
Definition: rna_ensemble.cc:33
bool has_base_pair_probs() const
Availability of pair probabilities.
Definition: rna_ensemble.cc:50
Parameters for partition folding.
Definition: pfold_params.hh:19
Implementation of RnaEnsemble.
Definition: rna_ensemble_impl.hh:19
double arc_prob(size_type i, size_type j) const
Get arc probability.
Definition: rna_ensemble.cc:87
double paired_upstream_prob(size_type i) const
Probability that a position is paired upstream.
Represents the raw structure ensemble data for an RNA.
Definition: rna_ensemble.hh:40
double min_free_energy() const
get minimum free energy
Definition: rna_ensemble.cc:70
double paired_downstream_prob(size_type i) const
Probability that a position is paired downstream.
Represents a multiple alignment.
Definition: multiple_alignment.hh:65
bool has_stacking_probs() const
Availability of stacking probabilities.
Definition: rna_ensemble.cc:55