LocARNA-1.9.2
|
00001 #ifndef LOCARNA_EXT_RNA_DATA_HH 00002 #define LOCARNA_EXT_RNA_DATA_HH 00003 00004 #ifdef HAVE_CONFIG_H 00005 #include <config.h> 00006 #endif 00007 00008 #include <iosfwd> 00009 #include "aux.hh" 00010 #include "sparse_matrix.hh" 00011 #include "rna_data.hh" 00012 00013 namespace LocARNA { 00014 00015 class RnaEnsemble; 00016 class ExtRnaDataImpl; 00017 class PFoldParams; 00018 class RnaStructure; 00019 00036 class ExtRnaData : public RnaData { 00037 private: 00038 friend class ExtRnaDataImpl; 00039 ExtRnaDataImpl 00040 *ext_pimpl_; 00041 public: 00054 ExtRnaData(const RnaEnsemble &rna_ensemble, 00055 double p_bpcut, 00056 double p_bpilcut, 00057 double p_uilcut, 00058 double max_bps_length_ratio, 00059 double max_uil_length_ratio, 00060 double max_bpil_length_ratio, 00061 const PFoldParams &pfoldparams); 00062 00075 ExtRnaData(const std::string &filename, 00076 double p_bpcut, 00077 double p_bpilcut, 00078 double p_uilcut, 00079 double max_bps_length_ratio, 00080 double max_uil_length_ratio, 00081 double max_bpil_length_ratio, 00082 const PFoldParams &pfoldparams); 00083 00084 private: 00088 ExtRnaData(const ExtRnaData &); 00089 00090 public: 00094 ~ExtRnaData(); 00095 00096 private: 00100 ExtRnaData & 00101 operator=(const ExtRnaData &); 00102 00103 public: 00108 double 00109 arc_in_loop_cutoff_prob() const; 00110 00121 double 00122 arc_in_loop_prob(pos_type i, pos_type j, pos_type p, pos_type q) const; 00123 00132 double 00133 arc_external_prob(pos_type i, pos_type j) const; 00134 00139 double 00140 unpaired_in_loop_cutoff_prob() const; 00141 00151 double 00152 unpaired_in_loop_prob(pos_type k, pos_type p, pos_type q) const; 00153 00161 double 00162 unpaired_external_prob(pos_type k) const; 00163 00171 std::ostream & 00172 write_size_info(std::ostream &out) const; 00173 00188 std::ostream & 00189 write_pp(std::ostream &out, 00190 double p_outbpcut = 0, 00191 double p_outbpilcut = 0, 00192 double p_outuilcut = 0) const; 00193 00194 protected: 00202 virtual std::istream & 00203 read_pp(std::istream &in); 00204 00214 virtual void 00215 init_from_fixed_structure(const RnaStructure &structure, 00216 const PFoldParams &pfoldparams); 00217 00229 virtual void 00230 init_from_rna_ensemble(const RnaEnsemble &rna_ensemble, 00231 const PFoldParams &pfoldparams); 00232 00241 virtual bool 00242 inloopprobs_ok() const; 00243 00244 }; // end class ExtRnaData 00245 } 00246 00247 #endif // LOCARNA_EXT_RNA_DATA_HH