#ifndef BWTALN_H #define BWTALN_H #include #include "bwt.h" #define BWA_TYPE_NO_MATCH 0 #define BWA_TYPE_UNIQUE 1 #define BWA_TYPE_REPEAT 2 #define BWA_TYPE_MATESW 3 #define SAM_FPD 1 // paired #define SAM_FPP 2 // properly paired #define SAM_FSU 4 // self-unmapped #define SAM_FMU 8 // mate-unmapped #define SAM_FSR 16 // self on the reverse strand #define SAM_FMR 32 // mate on the reverse strand #define SAM_FR1 64 // this is read one #define SAM_FR2 128 // this is read two #define SAM_FSC 256 // secondary alignment #define BWA_AVG_ERR 0.02 #define BWA_MIN_RDLEN 35 // for read trimming #ifndef bns_pac #define bns_pac(pac, k) ((pac)[(k)>>2] >> ((~(k)&3)<<1) & 3) #endif typedef struct { bwtint_t w; int bid; } bwt_width_t; typedef struct { uint32_t n_mm:8, n_gapo:8, n_gape:8, a:1; bwtint_t k, l; int score; } bwt_aln1_t; typedef uint16_t bwa_cigar_t; /* rgoya: If changing order of bytes, beware of operations like: * s->cigar[0] += s->full_len - s->len; */ #define CIGAR_OP_SHIFT 14 #define CIGAR_LN_MASK 0x3fff #define __cigar_op(__cigar) ((__cigar)>>CIGAR_OP_SHIFT) #define __cigar_len(__cigar) ((__cigar)&CIGAR_LN_MASK) #define __cigar_create(__op, __len) ((__op)<