src/c++/include/common/BCFHelpers.hh
/**
 * Check bcf records for equality
 * Equality is determined via chrom, pos, alleles
 * @param a first bcf record
 * @param b second bcf record
 * @return true if a == b
 */
Check bcf records for equality
Equality is determined via chrom, pos, alleles
@param a first bcf record
@param b second bcf record
@return true if a == b
Check bcf records for equality Equality is determined via chrom pos alleles @param a first bcf record @param b second bcf record @return true if a == b
bool inline equal(bcf1_t* a, bcf1_t* b)
{
    if (a->rid != b->rid)
    {
        return false;
    }
    if (a->pos != b->pos || a->n_allele != b->n_allele)
    {
        return false;
    }
    for (int i = 0; i < a->n_allele; i++)
    {
        if (strcmp(a->d.allele[i], b->d.allele[i]) != 0)
        {
            return false;
        }
    }
    return true;
}
bool inline equal ( bcf1_t * a , bcf1_t * b ) { if ( a -> rid != b -> rid ) { return false ; } if ( a -> pos != b -> pos || a -> n_allele != b -> n_allele ) { return false ; } for ( int i = 0 ; i < a -> n_allele ; i ++ ) { if ( strcmp ( a -> d . allele [ i ] , b -> d . allele [ i ] ) != 0 ) { return false ; } } return true ; }
Check bcf records for equality
 Equality is determined via chrom, pos, alleles
 @param a first bcf record
 @param b second bcf record
 @return true if a == b
Check bcf records for equality Equality is determined via chrom pos alleles @param a first bcf record @param b second bcf record @return true if a == b