Gamgee
You miserable little maggot. I'll stove your head in!
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Macros | Typedefs | Enumerations
cram_structs.h File Reference
#include <stdint.h>
#include "cram/thread_pool.h"
#include "cram/string_alloc.h"
#include "htslib/khash.h"

Go to the source code of this file.

Classes

union  pmap_t
 
struct  cram_stats
 
struct  cram_file_def
 
struct  cram_metrics
 
struct  cram_block
 
struct  cram_block_compression_hdr
 
struct  cram_map
 
struct  cram_block_slice_hdr
 
struct  cram_container
 
struct  cram_record
 
struct  cram_feature
 
struct  cram_slice
 
struct  ref_entry
 
struct  refs_t
 
struct  cram_index
 
struct  cram_range
 
struct  spare_bams
 
struct  cram_fd
 

Macros

#define SEQS_PER_SLICE   10000
 
#define SLICE_PER_CNT   1
 
#define CRAM_SUBST_MATRIX   "CGTNAGTNACTNACGNACGT"
 
#define MAX_STAT_VAL   1024
 
#define CRAM_MAJOR_VERS(v)   ((v) >> 8)
 
#define CRAM_MINOR_VERS(v)   ((v) & 0xff)
 
#define CRAM_MAP_HASH   32
 
#define CRAM_MAP(a, b)   (((a)*3+(b))&(CRAM_MAP_HASH-1))
 
#define cram_qname(c)   (&(c)->s->name_blk->data[(c)->name])
 
#define cram_seq(c)   (&(c)->s->seqs_blk->data[(c)->seq])
 
#define cram_qual(c)   (&(c)->s->qual_blk->data[(c)->qual])
 
#define cram_aux(c)   (&(c)->s->aux_blk->data[(c)->aux])
 
#define cram_seqi(c, i)   (cram_seq((c))[(i)])
 
#define cram_name_len(c)   ((c)->name_len)
 
#define cram_strand(c)   (((c)->flags & BAM_FREVERSE) != 0)
 
#define cram_mstrand(c)   (((c)->flags & BAM_FMREVERSE) != 0)
 
#define cram_cigar(c)   (&((cr)->s->cigar)[(c)->cigar])
 
#define CRAM_CIGAR
 
#define CRAM_SEQ
 
#define CRAM_FPAIRED   256
 
#define CRAM_FPROPER_PAIR   128
 
#define CRAM_FUNMAP   64
 
#define CRAM_FREVERSE   32
 
#define CRAM_FREAD1   16
 
#define CRAM_FREAD2   8
 
#define CRAM_FSECONDARY   4
 
#define CRAM_FQCFAIL   2
 
#define CRAM_FDUP   1
 
#define DS_aux_S   "\001"
 
#define DS_aux_OQ_S   "\002"
 
#define DS_aux_BQ_S   "\003"
 
#define DS_aux_BD_S   "\004"
 
#define DS_aux_BI_S   "\005"
 
#define DS_aux_FZ_S   "\006"
 
#define DS_aux_oq_S   "\007"
 
#define DS_aux_os_S   "\010"
 
#define DS_aux_oz_S   "\011"
 
#define CRAM_M_REVERSE   1
 
#define CRAM_M_UNMAP   2
 
#define CRAM_FLAG_PRESERVE_QUAL_SCORES   (1<<0)
 
#define CRAM_FLAG_DETACHED   (1<<1)
 
#define CRAM_FLAG_MATE_DOWNSTREAM   (1<<2)
 

Typedefs

typedef unsigned char uc
 
typedef struct cram_map cram_map
 
typedef struct cram_slice cram_slice
 
typedef struct ref_entry ref_entry
 
typedef struct cram_index cram_index
 
typedef struct spare_bams spare_bams
 
typedef struct cram_fd cram_fd
 

Enumerations

enum  cram_encoding {
  E_NULL = 0, E_EXTERNAL = 1, E_GOLOMB = 2, E_HUFFMAN = 3,
  E_BYTE_ARRAY_LEN = 4, E_BYTE_ARRAY_STOP = 5, E_BETA = 6, E_SUBEXP = 7,
  E_GOLOMB_RICE = 8, E_GAMMA = 9
}
 
enum  cram_external_type {
  E_INT = 1, E_LONG = 2, E_BYTE = 3, E_BYTE_ARRAY = 4,
  E_BYTE_ARRAY_BLOCK = 5
}
 
enum  cram_DS_ID {
  DS_CORE = 0, DS_aux = 1, DS_aux_OQ = 2, DS_aux_BQ = 3,
  DS_aux_BD = 4, DS_aux_BI = 5, DS_aux_FZ = 6, DS_aux_oq = 7,
  DS_aux_os = 8, DS_aux_oz = 9, DS_ref, DS_RN,
  DS_QS, DS_IN, DS_SC, DS_BF,
  DS_CF, DS_AP, DS_RG, DS_MQ,
  DS_NS, DS_MF, DS_TS, DS_NP,
  DS_NF, DS_RL, DS_FN, DS_FC,
  DS_FP, DS_DL, DS_BA, DS_BS,
  DS_TL, DS_RI, DS_RS, DS_PD,
  DS_HC, DS_BB, DS_QQ, DS_TN,
  DS_RN_len, DS_SC_len, DS_BB_len, DS_QQ_len,
  DS_TC, DS_TM, DS_TV, DS_END
}
 
enum  cram_block_method {
  ERROR = -1, RAW = 0, GZIP = 1, BZIP2 = 2,
  LZMA = 3, RANS = 4, RANS0 = 4, RANS1 = 10,
  GZIP_RLE = 11
}
 
enum  cram_content_type {
  CT_ERROR = -1, FILE_HEADER = 0, COMPRESSION_HEADER = 1, MAPPED_SLICE = 2,
  UNMAPPED_SLICE = 3, EXTERNAL = 4, CORE = 5
}
 
enum  cram_fields {
  CRAM_BF = 0x00000001, CRAM_AP = 0x00000002, CRAM_FP = 0x00000004, CRAM_RL = 0x00000008,
  CRAM_DL = 0x00000010, CRAM_NF = 0x00000020, CRAM_BA = 0x00000040, CRAM_QS = 0x00000080,
  CRAM_FC = 0x00000100, CRAM_FN = 0x00000200, CRAM_BS = 0x00000400, CRAM_IN = 0x00000800,
  CRAM_RG = 0x00001000, CRAM_MQ = 0x00002000, CRAM_TL = 0x00004000, CRAM_RN = 0x00008000,
  CRAM_NS = 0x00010000, CRAM_NP = 0x00020000, CRAM_TS = 0x00040000, CRAM_MF = 0x00080000,
  CRAM_CF = 0x00100000, CRAM_RI = 0x00200000, CRAM_RS = 0x00400000, CRAM_PD = 0x00800000,
  CRAM_HC = 0x01000000, CRAM_SC = 0x02000000, CRAM_BB = 0x04000000, CRAM_BB_len = 0x08000000,
  CRAM_QQ = 0x10000000, CRAM_QQ_len = 0x20000000, CRAM_aux = 0x40000000, CRAM_ALL = 0x7fffffff
}
 

Macro Definition Documentation

#define cram_aux (   c)    (&(c)->s->aux_blk->data[(c)->aux])
#define cram_cigar (   c)    (&((cr)->s->cigar)[(c)->cigar])
#define CRAM_CIGAR
Value:
Definition: cram_structs.h:736
Definition: cram_structs.h:743
Definition: cram_structs.h:745
Definition: cram_structs.h:757
Definition: cram_structs.h:759
Definition: cram_structs.h:756
Definition: cram_structs.h:734
Definition: cram_structs.h:742
Definition: cram_structs.h:758
Definition: cram_structs.h:738
Definition: cram_structs.h:737
#define CRAM_FDUP   1
#define CRAM_FLAG_DETACHED   (1<<1)
#define CRAM_FLAG_MATE_DOWNSTREAM   (1<<2)
#define CRAM_FLAG_PRESERVE_QUAL_SCORES   (1<<0)
#define CRAM_FPAIRED   256
#define CRAM_FPROPER_PAIR   128
#define CRAM_FQCFAIL   2
#define CRAM_FREAD1   16
#define CRAM_FREAD2   8
#define CRAM_FREVERSE   32
#define CRAM_FSECONDARY   4
#define CRAM_FUNMAP   64
#define CRAM_M_REVERSE   1
#define CRAM_M_UNMAP   2
#define CRAM_MAJOR_VERS (   v)    ((v) >> 8)
#define CRAM_MAP (   a,
 
)    (((a)*3+(b))&(CRAM_MAP_HASH-1))
#define CRAM_MAP_HASH   32
#define CRAM_MINOR_VERS (   v)    ((v) & 0xff)
#define cram_mstrand (   c)    (((c)->flags & BAM_FMREVERSE) != 0)
#define cram_name_len (   c)    ((c)->name_len)
#define cram_qname (   c)    (&(c)->s->name_blk->data[(c)->name])
#define cram_qual (   c)    (&(c)->s->qual_blk->data[(c)->qual])
#define cram_seq (   c)    (&(c)->s->seqs_blk->data[(c)->seq])
#define CRAM_SEQ
Value:
Definition: cram_structs.h:762
Definition: cram_structs.h:760
Definition: cram_structs.h:735
#define CRAM_CIGAR
Definition: cram_structs.h:772
Definition: cram_structs.h:740
Definition: cram_structs.h:744
Definition: cram_structs.h:741
Definition: cram_structs.h:737
#define cram_seqi (   c,
 
)    (cram_seq((c))[(i)])
#define cram_strand (   c)    (((c)->flags & BAM_FREVERSE) != 0)
#define CRAM_SUBST_MATRIX   "CGTNAGTNACTNACGNACGT"
#define DS_aux_BD_S   "\004"
#define DS_aux_BI_S   "\005"
#define DS_aux_BQ_S   "\003"
#define DS_aux_FZ_S   "\006"
#define DS_aux_OQ_S   "\002"
#define DS_aux_oq_S   "\007"
#define DS_aux_os_S   "\010"
#define DS_aux_oz_S   "\011"
#define DS_aux_S   "\001"
#define MAX_STAT_VAL   1024
#define SEQS_PER_SLICE   10000
#define SLICE_PER_CNT   1

Typedef Documentation

typedef struct cram_fd cram_fd
typedef struct cram_index cram_index
typedef struct cram_map cram_map
typedef struct cram_slice cram_slice
typedef struct ref_entry ref_entry
typedef struct spare_bams spare_bams
typedef unsigned char uc

Enumeration Type Documentation

Enumerator
ERROR 
RAW 
GZIP 
BZIP2 
LZMA 
RANS 
RANS0 
RANS1 
GZIP_RLE 
Enumerator
CT_ERROR 
FILE_HEADER 
COMPRESSION_HEADER 
MAPPED_SLICE 
UNMAPPED_SLICE 
EXTERNAL 
CORE 
enum cram_DS_ID
Enumerator
DS_CORE 
DS_aux 
DS_aux_OQ 
DS_aux_BQ 
DS_aux_BD 
DS_aux_BI 
DS_aux_FZ 
DS_aux_oq 
DS_aux_os 
DS_aux_oz 
DS_ref 
DS_RN 
DS_QS 
DS_IN 
DS_SC 
DS_BF 
DS_CF 
DS_AP 
DS_RG 
DS_MQ 
DS_NS 
DS_MF 
DS_TS 
DS_NP 
DS_NF 
DS_RL 
DS_FN 
DS_FC 
DS_FP 
DS_DL 
DS_BA 
DS_BS 
DS_TL 
DS_RI 
DS_RS 
DS_PD 
DS_HC 
DS_BB 
DS_QQ 
DS_TN 
DS_RN_len 
DS_SC_len 
DS_BB_len 
DS_QQ_len 
DS_TC 
DS_TM 
DS_TV 
DS_END 
Enumerator
E_NULL 
E_EXTERNAL 
E_GOLOMB 
E_HUFFMAN 
E_BYTE_ARRAY_LEN 
E_BYTE_ARRAY_STOP 
E_BETA 
E_SUBEXP 
E_GOLOMB_RICE 
E_GAMMA 
Enumerator
E_INT 
E_LONG 
E_BYTE 
E_BYTE_ARRAY 
E_BYTE_ARRAY_BLOCK 
Enumerator
CRAM_BF 
CRAM_AP 
CRAM_FP 
CRAM_RL 
CRAM_DL 
CRAM_NF 
CRAM_BA 
CRAM_QS 
CRAM_FC 
CRAM_FN 
CRAM_BS 
CRAM_IN 
CRAM_RG 
CRAM_MQ 
CRAM_TL 
CRAM_RN 
CRAM_NS 
CRAM_NP 
CRAM_TS 
CRAM_MF 
CRAM_CF 
CRAM_RI 
CRAM_RS 
CRAM_PD 
CRAM_HC 
CRAM_SC 
CRAM_BB 
CRAM_BB_len 
CRAM_QQ 
CRAM_QQ_len 
CRAM_aux 
CRAM_ALL