| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
#ifndef eslMSAWEIGHT_INCLUDED |
| 6 |
#define eslMSAWEIGHT_INCLUDED |
| 7 |
#include <esl_config.h> |
| 8 |
|
| 9 |
#include "esl_msa.h" |
| 10 |
#include "esl_rand64.h" |
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
typedef struct { |
| 16 |
float fragthresh; |
| 17 |
float symfrac; |
| 18 |
int ignore_rf; |
| 19 |
int allow_samp; |
| 20 |
int sampthresh; |
| 21 |
int nsamp; |
| 22 |
int maxfrag; |
| 23 |
uint64_t seed; |
| 24 |
|
| 25 |
|
| 26 |
int filterpref; |
| 27 |
} ESL_MSAWEIGHT_CFG; |
| 28 |
|
| 29 |
|
| 30 |
#define eslMSAWEIGHT_FRAGTHRESH 0.5 |
| 31 |
#define eslMSAWEIGHT_SYMFRAC 0.5 |
| 32 |
#define eslMSAWEIGHT_IGNORE_RF FALSE |
| 33 |
#define eslMSAWEIGHT_ALLOW_SAMP TRUE |
| 34 |
#define eslMSAWEIGHT_SAMPTHRESH 50000 |
| 35 |
#define eslMSAWEIGHT_NSAMP 10000 |
| 36 |
#define eslMSAWEIGHT_MAXFRAG 5000 |
| 37 |
#define eslMSAWEIGHT_RNGSEED 42 |
| 38 |
|
| 39 |
|
| 40 |
#define eslMSAWEIGHT_FILT_CONSCOVER 1 |
| 41 |
#define eslMSAWEIGHT_FILT_RANDOM 2 |
| 42 |
#define eslMSAWEIGHT_FILT_ORIGORDER 3 |
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
typedef struct { |
| 49 |
uint64_t seed; |
| 50 |
|
| 51 |
int cons_by_rf; |
| 52 |
int cons_by_sample; |
| 53 |
int cons_by_all; |
| 54 |
int cons_allcols; |
| 55 |
int rejected_sample; |
| 56 |
|
| 57 |
int ncons; |
| 58 |
int *conscols; |
| 59 |
|
| 60 |
int all_nfrag; |
| 61 |
int samp_nfrag; |
| 62 |
} ESL_MSAWEIGHT_DAT; |
| 63 |
|
| 64 |
|
| 65 |
extern int esl_msaweight_PB(ESL_MSA *msa); |
| 66 |
extern int esl_msaweight_PB_adv(const ESL_MSAWEIGHT_CFG *cfg, ESL_MSA *msa, ESL_MSAWEIGHT_DAT *dat); |
| 67 |
|
| 68 |
extern ESL_MSAWEIGHT_CFG *esl_msaweight_cfg_Create(void); |
| 69 |
extern void esl_msaweight_cfg_Destroy(ESL_MSAWEIGHT_CFG *cfg); |
| 70 |
extern ESL_MSAWEIGHT_DAT *esl_msaweight_dat_Create(void); |
| 71 |
extern int esl_msaweight_dat_Reuse (ESL_MSAWEIGHT_DAT *dat); |
| 72 |
extern void esl_msaweight_dat_Destroy(ESL_MSAWEIGHT_DAT *dat); |
| 73 |
|
| 74 |
extern int esl_msaweight_GSC(ESL_MSA *msa); |
| 75 |
extern int esl_msaweight_BLOSUM(ESL_MSA *msa, double maxid); |
| 76 |
|
| 77 |
extern int esl_msaweight_IDFilter(const ESL_MSA *msa, double maxid, ESL_MSA **ret_newmsa); |
| 78 |
extern int esl_msaweight_IDFilter_adv(const ESL_MSAWEIGHT_CFG *cfg, const ESL_MSA *msa, double maxid, ESL_MSA **ret_newmsa); |
| 79 |
|
| 80 |
|
| 81 |
#endif |