bl_sam_buff_init(3)

NAME
bl_sam_buff_init() - Initialize a SAM buffer object

LIBRARY
#include <biolibc/sam-buff.h>
-lbiolibc -lxtend

SYNOPSIS
void    bl_sam_buff_init(bl_sam_buff_t *sam_buff, unsigned int mapq_min,
size_t max_alignments)

ARGUMENTS
sam_buff    Pointer to a the bl_sam_buff_t structure to initialize
mapq_min    User-selected minimum MAPQ value

DESCRIPTION
Initialize a SAM alignment buffer for holding recently read SAM alignments. This is useful, for example, when scanning a SAM stream for alignments overlapping a certain region or position. The buffer array is set to a reasonable initial size and extended as far as BL_SAM_BUFF_MAX_SIZE by bl_sam_buff_add_alignment(3) if needed. A minimum MAPQ value is stored in the bl_sam_buff_t structure for filtering with bl_sam_buff_alignment_ok(3).

SEE ALSO
bl_sam_buff_check_order(3), bl_sam_read(3)