vcf.c
/***************************************************************************
 *  Library:
 *      #include <biolibc/vcf.h>
 *      -lbiolibc -lxtend
 *
 *  Description:
 *      Determine if a VCF call is within a SAM alignment, i.e. on the
 *      same chrom and between the start and end positions of the
 *      alignment.
 *
 *  Arguments:
 *      vcf_call    Pointer to bl_vcf_t structure containing VCF call
 *      sam_alignment   Pointer to bl_sam_t structure containing alignment
 *
 *  Returns:
 *      true if the call is within the alignment
 *      false otherwise
 *
 *  See also:
 *      bl_vcf_call_downstream_of_alignment(3)
 *
 *  History: 
 *  Date        Name        Modification
 *  2020-05-26  Jason Bacon Begin
 ***************************************************************************/
#include 
-lbiolibc -lxtend

Determine if a VCF call is within a SAM alignment, i.e. on the
same chrom and between the start and end positions of the
alignment.

vcf_call    Pointer to bl_vcf_t structure containing VCF call
sam_alignment   Pointer to bl_sam_t structure containing alignment

true if the call is within the alignment
false otherwise



Date        Name        Modification
2020-05-26  Jason Bacon Begin
#include - lbiolibc - lxtend Determine if a VCF call is within a SAM alignment i . e . on the same chrom and between the start and end positions of the alignment . vcf_call Pointer to bl_vcf_t structure containing VCF call sam_alignment Pointer to bl_sam_t structure containing alignment true if the call is within the alignment false otherwise Date Name Modification 2020 - 05 - 26 Jason Bacon Begin
bool    bl_vcf_call_in_alignment(bl_vcf_t *vcf_call, bl_sam_t *sam_alignment)
{
    if ( (strcmp(BL_VCF_CHROM(vcf_call), BL_SAM_RNAME(sam_alignment)) == 0) &&
	 (BL_VCF_POS(vcf_call) >= BL_SAM_POS(sam_alignment)) &&
	 (BL_VCF_POS(vcf_call) <
	    BL_SAM_POS(sam_alignment) + BL_SAM_SEQ_LEN(sam_alignment)) )
	return true;
    else
	return false;
}
bool bl_vcf_call_in_alignment ( bl_vcf_t * vcf_call , bl_sam_t * sam_alignment ) { if ( ( strcmp ( BL_VCF_CHROM ( vcf_call ) , BL_SAM_RNAME ( sam_alignment ) ) == 0 ) && ( BL_VCF_POS ( vcf_call ) >= BL_SAM_POS ( sam_alignment ) ) && ( BL_VCF_POS ( vcf_call ) < BL_SAM_POS ( sam_alignment ) + BL_SAM_SEQ_LEN ( sam_alignment ) ) ) return true ; else return false ; }
Library:
      #include <biolibc/vcf.h>
      -lbiolibc -lxtend
Library : #include <biolibc / vcf . h > - lbiolibc - lxtend