17#ifndef LIBFREECONTACT_H
18#define LIBFREECONTACT_H
31#define LIBFREEC_API __attribute__ ((visibility ("default")))
32#define LIBFREEC_LOCAL __attribute__ ((visibility ("hidden")))
41 21, 0, 3, 4, 3, 6, 13, 7, 8, 9, 21, 11, 10, 12, 2,
43 21, 14, 5, 1, 15, 16, 21, 19, 17, 21, 18, 6
47 'A',
'R',
'N',
'D',
'C',
'Q',
'E',
'G',
'H',
'I',
48 'L',
'K',
'M',
'F',
'P',
'S',
'T',
'W',
'Y',
'V',
55 alilen_error(
const std::string& __arg) : std::runtime_error(__arg){}
65typedef long long __m128i
__attribute__ ((__vector_size__ (16), __may_alias__));
72 #pragma GCC visibility push(hidden)
73 #pragma GCC visibility pop
80 ali_t(
const uint16_t __alilen = 0 ) : std::vector<__m128i>(), seqcnt(0), alilen(__alilen), alilen16(( alilen-1 )/16 + 1), alilenpad( 16 * alilen16 )
82 reserve(1024*alilen16);
88 return reinterpret_cast<uint8_t*
>(this->_M_impl._M_start)[ __k*alilenpad + __ai ];
90 inline const uint8_t&
operator()(uint32_t __k, uint16_t __ai)
const
92 return reinterpret_cast<uint8_t*
>(this->_M_impl._M_start)[ __k*alilenpad + __ai ];
96 static std::vector<uint8_t>
99 std::vector<uint8_t> ret; ret.reserve(__l.length());
100 for( std::string::const_iterator l_b = __l.begin(), l_e = __l.end(); l_b != l_e; ++l_b )
102 const std::string::value_type c = *l_b;
104 ret.push_back(
aamap[c & 0x1F] );
113 ali_t& push(
const std::vector<uint8_t>& __al);
118 return push(read_a_seq(__l));
129 contact_t( uint16_t __i = 0, uint16_t __j = 0,
float __score = 0 ) : i(__i), j(__j), score(__score) {}
141 parset_t(
double __clustpc = 0,
double __density = 0,
double __gapth = 0, uint16_t __mincontsep = 0,
142 double __pseudocnt = 0,
double __pscnt_weight = 0,
bool __estimate_ivcov = 0,
double __shrink_lambda = 0,
143 bool __cov20 = 0,
bool __apply_gapth = 0,
double __rho = 0
153 ps_evfold( 0.70, 0.0, 0.9, 1, 0.0, 0.5,
false, 0.0,
true,
true, -1 ),
154 ps_psicov( 0.62, 0.03, 0.9, 5, 1.0, 0.0,
true, 0.1,
false,
false, -1 ),
155 ps_psicov_sd( 0.62, 0.0, 0.9, 5, 1.0, 0.0,
true, 0.1,
false,
false, 0.001 );
162 typedef std::map<std::string, std::vector<contact_t> >
cont_res_t;
181 void get_seq_weights(
182 freq_vec_t &__aliw,
double &__wtot,
183 const ali_t& __ali,
double __clustpc,
184 bool __veczw =
true,
int __num_threads = 0
214 cont_res_t run(
const ali_t& __ali,
const freq_vec_t &__aliw,
const double __wtot,
215 double __density,
double __gapth, uint16_t __mincontsep,
216 double __pseudocnt,
double __pscnt_weight,
bool __estimate_ivcov,
double __shrink_lambda,
217 bool __cov20,
bool __apply_gapth,
double __rho,
218 int __num_threads = 0, time_t __icme_timeout = 1800, time_res_t *__timing = NULL
222 cont_res_t run(
const ali_t& __ali,
double __clustpc,
223 double __density,
double __gapth, uint16_t __mincontsep,
224 double __pseudocnt,
double __pscnt_weight,
bool __estimate_ivcov,
double __shrink_lambda,
225 bool __cov20,
bool __apply_gapth,
double __rho,
226 bool __veczw =
true,
int __num_threads = 0, time_t __icme_timeout = 1800, time_res_t *__timing = NULL
233 bool __veczw =
true,
int __num_threads = 0, time_t __icme_timeout = 1800,
time_res_t *__timing = NULL
236 return run(__ali, __parset.
clustpc,
240 __veczw, __num_threads, __icme_timeout, __timing);