libfreecontact  1.0.21
 All Classes Namespaces Files Functions Variables Typedefs Macros
Public Types | Public Member Functions | Public Attributes | List of all members
freecontact::predictor Class Reference

Protein residue contact predictor. More...

#include <freecontact.h>

Public Types

typedef std::map< std::string,
std::vector< contact_t > > 
cont_res_t
 
typedef double freq_t
 
typedef float pairfreq_t
 
typedef std::vector< freq_tfreq_vec_t
 
typedef std::map< std::string,
double > 
time_res_t
 

Public Member Functions

 predictor (bool __dbg=false)
 
virtual ~predictor ()
 
void get_seq_weights (freq_vec_t &__aliw, double &__wtot, const ali_t &__ali, double __clustpc, bool __veczw=true, int __num_threads=0) throw (alilen_error, icme_timeout_error, std::range_error, std::runtime_error)
 Calculate alignment sequence weights. More...
 
cont_res_t run (const ali_t &__ali, const freq_vec_t &__aliw, const double __wtot, double __density, double __gapth, uint16_t __mincontsep, double __pseudocnt, double __pscnt_weight, bool __estimate_ivcov, double __shrink_lambda, bool __cov20, bool __apply_gapth, double __rho, int __num_threads=0, time_t __icme_timeout=1800, time_res_t *__timing=NULL) throw (alilen_error, icme_timeout_error, std::range_error, std::runtime_error)
 Predict residue contacts. More...
 
cont_res_t run (const ali_t &__ali, double __clustpc, double __density, double __gapth, uint16_t __mincontsep, double __pseudocnt, double __pscnt_weight, bool __estimate_ivcov, double __shrink_lambda, bool __cov20, bool __apply_gapth, double __rho, bool __veczw=true, int __num_threads=0, time_t __icme_timeout=1800, time_res_t *__timing=NULL) throw (alilen_error, icme_timeout_error, std::range_error, std::runtime_error)
 Predict residue contacts. More...
 
cont_res_t run (const ali_t &__ali, const parset_t &__parset, bool __veczw=true, int __num_threads=0, time_t __icme_timeout=1800, time_res_t *__timing=NULL) throw (alilen_error, icme_timeout_error, std::range_error, std::runtime_error)
 Predict residue contacts. More...
 

Public Attributes

bool dbg
 

Detailed Description

Protein residue contact predictor.

A sufficiently large multiple alignment is required for meaningful results.

Definition at line 160 of file freecontact.h.

Member Typedef Documentation

typedef std::map<std::string, std::vector<contact_t> > freecontact::predictor::cont_res_t

Definition at line 162 of file freecontact.h.

Definition at line 163 of file freecontact.h.

Definition at line 165 of file freecontact.h.

Definition at line 164 of file freecontact.h.

typedef std::map<std::string, double> freecontact::predictor::time_res_t

Definition at line 166 of file freecontact.h.

Constructor & Destructor Documentation

freecontact::predictor::predictor ( bool  __dbg = false)
inline

Definition at line 169 of file freecontact.h.

virtual freecontact::predictor::~predictor ( )
inlinevirtual

Definition at line 170 of file freecontact.h.

Member Function Documentation

void freecontact::predictor::get_seq_weights ( freq_vec_t __aliw,
double &  __wtot,
const ali_t __ali,
double  __clustpc,
bool  __veczw = true,
int  __num_threads = 0 
)
throw (alilen_error,
icme_timeout_error,
std::range_error,
std::runtime_error
)

Calculate alignment sequence weights.

Parameters
[out]__aliwVector of alignment sequence weights.
[out]__wtotTotal alignment weight.
[in]__aliInput alignment.
[in]__clustpcBLOSUM-style clustering similarity threshold [0-1].
[in]__veczwUse vectorized sequence weighting when available.
[in]__num_threadsNumber of OpenMP threads, effective if non-zero. The default is as many threads as cores in host. Ineffective if library is not compiled with OMP support.

Definition at line 236 of file freecontact.cpp.

predictor::cont_res_t freecontact::predictor::run ( const ali_t __ali,
const freq_vec_t __aliw,
const double  __wtot,
double  __density,
double  __gapth,
uint16_t  __mincontsep,
double  __pseudocnt,
double  __pscnt_weight,
bool  __estimate_ivcov,
double  __shrink_lambda,
bool  __cov20,
bool  __apply_gapth,
double  __rho,
int  __num_threads = 0,
time_t  __icme_timeout = 1800,
time_res_t __timing = NULL 
)
throw (alilen_error,
icme_timeout_error,
std::range_error,
std::runtime_error
)

Predict residue contacts.

Parameters
[in]__aliInput alignment.
[in]__aliwVector of alignment sequence weights. Obtain this with get_seq_weights().
[in]__wtotTotal weight of alignment. Obtain this with get_seq_weights().
[in]__densityTarget precision matrix density [0-1]. Set to 0 to not control density.
[in]__gapthThreshold of weighted gap frequency for ignoring alignment columns with too many gaps [0-1]. Set to 1.00 to keep all columns. This is implemented by using a very high regularization value for gap columns, and by excluding gap columns from the covariance matrix, see __apply_gapth.
[in]__mincontsepMinimum sequence-wise contacting residue pair separation given in amino acids as (j-i). 1 for adjacent residues. [1-).
[in]__pseudocntNumber to initialize single and pair amino acid counts with [0-).
[in]__pscnt_weightPseudocount weight to apply to single and pair amino acid frequencies [0-1].
[in]__estimate_ivcovEstimate inverse covariance matrix instead of fully inverting matrix. This is currently done by GLASSOFAST.
[in]__shrink_lambdaCovariance matrix shrinkage parameter, controlling rate of shrinkage [0-1].
[in]__cov20Leave one amino acid off the covariance matrix, making it non-overdetermined.
[in]__apply_gapthWhen true, exclude residue columns and rows with a weighted gap frequency > __gapth from the covariance matrix.
[in]__rhoInitial value of Glasso regularization parameter. Negative values trigger an automatic choice for rho.
[in]__num_threadsNumber of OpenMP threads, effective if non-zero. The default is as many threads as cores in host. Ineffective if library is not compiled with OMP support.
[in]__icme_timeoutInverse covariance matrix estimation timeout in seconds. Default: 1800. Applied to each inversion call independently.
[out]__timingPointer to map of timing results for certain components of this method. Useful for debugging. Keys are: [num_threads|seqw|pairfreq|shrink|inv|all].
Returns
Map of vectors of predicted contacts. Key is contact score calculation method name: 'l1norm', 'MI' (mutual information), 'fro' (Frobenius norm after zero-sum gauge). Vectors may not contain all contact pairs. Contacts are ordered by residue index (i,j).

Definition at line 434 of file freecontact.cpp.

predictor::cont_res_t freecontact::predictor::run ( const ali_t __ali,
double  __clustpc,
double  __density,
double  __gapth,
uint16_t  __mincontsep,
double  __pseudocnt,
double  __pscnt_weight,
bool  __estimate_ivcov,
double  __shrink_lambda,
bool  __cov20,
bool  __apply_gapth,
double  __rho,
bool  __veczw = true,
int  __num_threads = 0,
time_t  __icme_timeout = 1800,
time_res_t __timing = NULL 
)
throw (alilen_error,
icme_timeout_error,
std::range_error,
std::runtime_error
)

Predict residue contacts.

Definition at line 971 of file freecontact.cpp.

cont_res_t freecontact::predictor::run ( const ali_t __ali,
const parset_t __parset,
bool  __veczw = true,
int  __num_threads = 0,
time_t  __icme_timeout = 1800,
time_res_t __timing = NULL 
)
throw (alilen_error,
icme_timeout_error,
std::range_error,
std::runtime_error
)
inline

Predict residue contacts.

Definition at line 231 of file freecontact.h.

Member Data Documentation

bool freecontact::predictor::dbg

Definition at line 168 of file freecontact.h.


The documentation for this class was generated from the following files: