|
int | itf8_decode (cram_fd *fd, int32_t *val_p) |
|
int | itf8_encode (cram_fd *fd, int32_t val) |
|
int | itf8_get (char *cp, int32_t *val_p) |
|
int | itf8_put (char *cp, int32_t val) |
|
int | ltf8_put (char *cp, int64_t val) |
|
int | ltf8_get (char *cp, int64_t *val_p) |
|
int | ltf8_decode (cram_fd *fd, int64_t *val_p) |
|
int | itf8_put_blk (cram_block *blk, int val) |
|
int | int32_decode (cram_fd *fd, int32_t *val) |
|
int | int32_encode (cram_fd *fd, int32_t val) |
|
int | int32_get (cram_block *b, int32_t *val) |
|
int | int32_put (cram_block *b, int32_t val) |
|
char * | zlib_mem_inflate (char *cdata, size_t csize, size_t *size) |
|
cram_block * | cram_new_block (enum cram_content_type content_type, int content_id) |
|
cram_block * | cram_read_block (cram_fd *fd) |
|
int | cram_write_block (cram_fd *fd, cram_block *b) |
|
void | cram_free_block (cram_block *b) |
|
int | cram_uncompress_block (cram_block *b) |
|
int | cram_compress_block (cram_fd *fd, cram_block *b, cram_metrics *metrics, int method, int level) |
|
cram_metrics * | cram_new_metrics (void) |
|
char * | cram_block_method2str (enum cram_block_method m) |
|
char * | cram_content_type2str (enum cram_content_type t) |
|
int | paranoid_fclose (FILE *fp) |
|
void | refs_free (refs_t *r) |
|
int | refs2id (refs_t *r, SAM_hdr *h) |
|
int | cram_set_header (cram_fd *fd, SAM_hdr *hdr) |
|
void | expand_cache_path (char *path, char *dir, char *fn) |
|
void | mkdir_prefix (char *path, int mode) |
|
void | cram_ref_incr (refs_t *r, int id) |
|
void | cram_ref_decr (refs_t *r, int id) |
|
ref_entry * | cram_ref_load (refs_t *r, int id) |
|
char * | cram_get_ref (cram_fd *fd, int id, int start, int end) |
|
int | cram_load_reference (cram_fd *fd, char *fn) |
|
cram_container * | cram_new_container (int nrec, int nslice) |
|
void | cram_free_container (cram_container *c) |
|
cram_container * | cram_read_container (cram_fd *fd) |
|
int | cram_write_container (cram_fd *fd, cram_container *c) |
|
int | cram_flush_container (cram_fd *fd, cram_container *c) |
|
void * | cram_flush_thread (void *arg) |
|
int | cram_flush_container_mt (cram_fd *fd, cram_container *c) |
|
cram_block_compression_hdr * | cram_new_compression_header (void) |
|
void | cram_free_compression_header (cram_block_compression_hdr *hdr) |
|
void | cram_free_slice_header (cram_block_slice_hdr *hdr) |
|
void | cram_free_slice (cram_slice *s) |
|
cram_slice * | cram_new_slice (enum cram_content_type type, int nrecs) |
|
cram_slice * | cram_read_slice (cram_fd *fd) |
|
cram_file_def * | cram_read_file_def (cram_fd *fd) |
|
int | cram_write_file_def (cram_fd *fd, cram_file_def *def) |
|
void | cram_free_file_def (cram_file_def *def) |
|
SAM_hdr * | cram_read_SAM_hdr (cram_fd *fd) |
|
int | cram_write_SAM_hdr (cram_fd *fd, SAM_hdr *hdr) |
|
cram_fd * | cram_open (const char *filename, const char *mode) |
|
cram_fd * | cram_dopen (hFILE *fp, const char *filename, const char *mode) |
|
int | cram_seek (cram_fd *fd, off_t offset, int whence) |
|
int | cram_flush (cram_fd *fd) |
|
int | cram_close (cram_fd *fd) |
|
int | cram_eof (cram_fd *fd) |
|
int | cram_set_option (cram_fd *fd, enum cram_option opt,...) |
|
int | cram_set_voption (cram_fd *fd, enum cram_option opt, va_list args) |
|
char* cram_get_ref |
( |
cram_fd * |
fd, |
|
|
int |
id, |
|
|
int |
start, |
|
|
int |
end |
|
) |
| |
Returns a portion of a reference sequence from start to end inclusive.
The returned pointer is owned by the cram_file fd and should not be freed by the caller. It is valid only until the next cram_get_ref is called with the same fd parameter (so is thread-safe if given multiple files).
To return the entire reference sequence, specify start as 1 and end as 0.
- Returns
- Returns reference on success; NULL on failure
CRAM blocks - the dynamically growable data block. We have code to create, update, (un)compress and read/write.
These are derived from the deflate_interlaced.c blocks, but with the CRAM extension of content types and IDs.
Allocates a new cram_block structure with a specified content_type and id.
- Returns
- Returns block pointer on success; NULL on failure