LocARNA-1.9.2
src/LocARNA/rna_ensemble.hh
00001 #ifndef LOCARNA_RNA_ENSEMBLE_HH
00002 #define LOCARNA_RNA_ENSEMBLE_HH
00003 
00004 #ifdef HAVE_CONFIG_H
00005 #include <config.h>
00006 #endif
00007 
00008 #include <iosfwd>
00009 
00010 #include "aux.hh"
00011 
00012 namespace LocARNA {
00013 
00014     class MultipleAlignment;
00015 
00016     class RnaEnsembleImpl; // forward to implementation class
00017 
00018     class PFoldParams;
00019 
00040     class RnaEnsemble {
00041     private:
00042         RnaEnsembleImpl
00043             *pimpl_; 
00044     public:
00060         RnaEnsemble(const MultipleAlignment &ma,
00061                     const PFoldParams &params,
00062                     bool inLoopProbs,
00063                     bool use_alifold = true);
00064 
00070         RnaEnsemble(const RnaEnsemble &rna_ensemble);
00071 
00077         RnaEnsemble &
00078         operator=(const RnaEnsemble &rna_ensemble);
00079 
00086         virtual ~RnaEnsemble();
00087 
00093         bool
00094         has_base_pair_probs() const;
00095 
00101         bool
00102         has_stacking_probs() const;
00103 
00109         bool
00110         has_in_loop_probs() const;
00111 
00116         const MultipleAlignment &
00117         multiple_alignment() const;
00118 
00123         size_type
00124         length() const;
00125 
00135         double
00136         min_free_energy() const;
00137 
00147         std::string
00148         min_free_energy_structure() const;
00149 
00150         // ------------------------------------------------------------
00151         // methods for base pair probabilities
00152 
00159         double
00160         arc_prob(size_type i, size_type j) const;
00161 
00169         double
00170         arc_2_prob(size_type i, size_type j) const;
00171 
00180         double
00181         arc_stack_prob(size_type i, size_type j) const;
00182 
00183         // ------------------------------------------------------------
00184         // compute probabilities paired upstream, downstream, and unpaired
00185 
00195         double
00196         paired_upstream_prob(size_type i) const;
00197 
00207         double
00208         paired_downstream_prob(size_type i) const;
00209 
00216         double
00217         unpaired_prob(size_type i) const;
00218 
00219         // the following methods need linking to librna
00220 
00246         double
00247         unpaired_in_loop_prob(size_type k, size_type i, size_type j) const;
00248 
00268         double
00269         unpaired_external_prob(size_type k) const;
00270 
00298         double
00299         arc_in_loop_prob(size_type ip,
00300                          size_type jp,
00301                          size_type i,
00302                          size_type j) const;
00303 
00325         double
00326         arc_external_prob(size_type i, size_type j) const;
00327     };
00328 }
00329 
00330 #endif // LOCARNA_RNA_ENSEMBLE_HH
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends