sam.c
/***************************************************************************
 *  Library:
 *      #include <biolibc/sam.h>
 *      -lbiolibc -lxtend
 *
 *  Description:
 *      Initialize a bl_sam_t structure, allocating memory for
 *      sequence and quality strings according to seq_len.  Passing a
 *      seq_len of 0 prevents memory allocation from occurring.
 *
 *      Only BL_SAM_FIELD_SEQ and BL_SAM_FIELD_QUAL are meaningful bits in
 *      field_mask, as they determine whether memory is allocated.  All
 *      other fields are unconditionally initialized to 0, NULL, or blank.
 *
 *  Arguments:
 *      alignment   Pointer to bl_sam_t structure to initialize
 *      seq_len     Length of sequence and quality strings
 *      field_mask  Bit mask indicating which fields will be used
 *
 *  See also:
 *      bl_sam_read(3), bl_sam_free(3), bl_sam_copy(3)
 *
 *  History: 
 *  Date        Name        Modification
 *  2020-05-29  Jason Bacon Begin
 ***************************************************************************/
#include 
-lbiolibc -lxtend

Initialize a bl_sam_t structure, allocating memory for
sequence and quality strings according to seq_len.  Passing a
seq_len of 0 prevents memory allocation from occurring.

Only BL_SAM_FIELD_SEQ and BL_SAM_FIELD_QUAL are meaningful bits in
field_mask, as they determine whether memory is allocated.  All
other fields are unconditionally initialized to 0, NULL, or blank.

alignment   Pointer to bl_sam_t structure to initialize
seq_len     Length of sequence and quality strings
field_mask  Bit mask indicating which fields will be used



Date        Name        Modification
2020-05-29  Jason Bacon Begin
#include - lbiolibc - lxtend Initialize a bl_sam_t structure allocating memory for sequence and quality strings according to seq_len . Passing a seq_len of 0 prevents memory allocation from occurring . Only BL_SAM_FIELD_SEQ and BL_SAM_FIELD_QUAL are meaningful bits in field_mask as they determine whether memory is allocated . All other fields are unconditionally initialized to 0 NULL or blank . alignment Pointer to bl_sam_t structure to initialize seq_len Length of sequence and quality strings field_mask Bit mask indicating which fields will be used Date Name Modification 2020 - 05 - 29 Jason Bacon Begin
void    bl_sam_init(bl_sam_t *alignment)
{
    *alignment->qname = '\0';
    alignment->flag = 0;
    *alignment->rname = '\0';
    alignment->pos = 0;
    alignment->mapq = 0;
    alignment->cigar = NULL;
    *alignment->rnext = '\0';
    alignment->pnext = 0;
    alignment->tlen = 0;
    alignment->seq = NULL;
    alignment->qual = NULL;
    alignment->seq_array_size = 0;
    alignment->seq_len = 0;
    alignment->qual_array_size = 0;
    alignment->qual_len = 0;
}
void bl_sam_init ( bl_sam_t * alignment ) { * alignment -> qname = ' \0 ' ; alignment -> flag = 0 ; * alignment -> rname = ' \0 ' ; alignment -> pos = 0 ; alignment -> mapq = 0 ; alignment -> cigar = NULL ; * alignment -> rnext = ' \0 ' ; alignment -> pnext = 0 ; alignment -> tlen = 0 ; alignment -> seq = NULL ; alignment -> qual = NULL ; alignment -> seq_array_size = 0 ; alignment -> seq_len = 0 ; alignment -> qual_array_size = 0 ; alignment -> qual_len = 0 ; }
Library:
      #include <biolibc/sam.h>
      -lbiolibc -lxtend
Library : #include <biolibc / sam . h > - lbiolibc - lxtend