| 1 |
|
| 2 |
|
| 3 |
#ifndef eslGENCODE_INCLUDED |
| 4 |
#define eslGENCODE_INCLUDED |
| 5 |
#include <esl_config.h> |
| 6 |
|
| 7 |
#include "easel.h" |
| 8 |
#include "esl_alphabet.h" |
| 9 |
#include "esl_fileparser.h" |
| 10 |
#include "esl_sq.h" |
| 11 |
#include "esl_sqio.h" |
| 12 |
#include "esl_getopts.h" |
| 13 |
|
| 14 |
typedef struct { |
| 15 |
int transl_table; |
| 16 |
char desc[128]; |
| 17 |
|
| 18 |
ESL_DSQ basic[64]; |
| 19 |
int8_t is_initiator[64]; |
| 20 |
|
| 21 |
const ESL_ALPHABET *nt_abc; |
| 22 |
const ESL_ALPHABET *aa_abc; |
| 23 |
} ESL_GENCODE; |
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
typedef struct esl_gencode_workstate_s { |
| 33 |
|
| 34 |
ESL_SQ *psq[3]; |
| 35 |
int8_t in_orf[3]; |
| 36 |
int apos; |
| 37 |
int frame; |
| 38 |
int codon; |
| 39 |
int inval; |
| 40 |
int is_revcomp; |
| 41 |
int orfcount; |
| 42 |
|
| 43 |
ESL_SQ_BLOCK *orf_block; |
| 44 |
|
| 45 |
|
| 46 |
int do_watson; |
| 47 |
int do_crick; |
| 48 |
int using_initiators; |
| 49 |
int minlen; |
| 50 |
FILE *outfp; |
| 51 |
int outformat; |
| 52 |
} ESL_GENCODE_WORKSTATE; |
| 53 |
|
| 54 |
|
| 55 |
extern void esl_gencode_WorkstateDestroy(ESL_GENCODE_WORKSTATE *wrk); |
| 56 |
extern ESL_GENCODE_WORKSTATE * esl_gencode_WorkstateCreate(ESL_GETOPTS *go, ESL_GENCODE *gcode); |
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
extern ESL_GENCODE *esl_gencode_Create(const ESL_ALPHABET *nt_abc, const ESL_ALPHABET *aa_abc); |
| 61 |
extern void esl_gencode_Destroy (ESL_GENCODE *gcode); |
| 62 |
extern int esl_gencode_Set (ESL_GENCODE *gcode, int ncbi_transl_table); |
| 63 |
extern int esl_gencode_SetInitiatorAny (ESL_GENCODE *gcode); |
| 64 |
extern int esl_gencode_SetInitiatorOnlyAUG(ESL_GENCODE *gcode); |
| 65 |
|
| 66 |
|
| 67 |
extern int esl_gencode_Read(ESL_FILEPARSER *efp, const ESL_ALPHABET *nucleic_abc, const ESL_ALPHABET *amino_abc, ESL_GENCODE **ret_gcode); |
| 68 |
extern int esl_gencode_Write(FILE *ofp, const ESL_GENCODE *gcode, int add_comment); |
| 69 |
|
| 70 |
|
| 71 |
extern int esl_gencode_GetTranslation(const ESL_GENCODE *gcode, ESL_DSQ *dsqp); |
| 72 |
extern int esl_gencode_IsInitiator (const ESL_GENCODE *gcode, ESL_DSQ *dsqp); |
| 73 |
|
| 74 |
|
| 75 |
extern char *esl_gencode_DecodeDigicodon(const ESL_GENCODE *gcode, int digicodon, char *codon); |
| 76 |
extern int esl_gencode_DumpAltCodeTable(FILE *ofp); |
| 77 |
extern int esl_gencode_Compare(const ESL_GENCODE *gc1, const ESL_GENCODE *gc2, int metadata_too); |
| 78 |
|
| 79 |
|
| 80 |
extern int esl_gencode_ProcessOrf(ESL_GENCODE_WORKSTATE *wrk, ESL_SQ *sq); |
| 81 |
extern void esl_gencode_ProcessStart(ESL_GENCODE *gcode, ESL_GENCODE_WORKSTATE *wrk, ESL_SQ *sq); |
| 82 |
extern int esl_gencode_ProcessPiece(ESL_GENCODE *gcode, ESL_GENCODE_WORKSTATE *wrk, ESL_SQ *sq); |
| 83 |
extern int esl_gencode_ProcessEnd(ESL_GENCODE_WORKSTATE *wrk, ESL_SQ *sq); |
| 84 |
|
| 85 |
|
| 86 |
#endif |