@@ -2753,7 +2753,8 @@ int can_merge(args_t *args)
27532753 id = line -> d .id ;
27542754 else
27552755 {
2756- int var_type = bcf_get_variant_types (line );
2756+ int var_type = bcf_has_variant_types (line , VCF_ANY , bcf_match_overlap );
2757+ if (var_type < 0 ) error ("bcf_has_variant_types() failed." );
27572758 if ( args -> collapse == COLLAPSE_SNP_INS_DEL )
27582759 {
27592760 // need to distinguish between ins and del so strip the VCF_INDEL flag
@@ -2794,7 +2795,8 @@ int can_merge(args_t *args)
27942795
27952796 bcf1_t * line = buf -> lines [j ]; // ptr to reader's buffer or gvcf buffer
27962797
2797- int line_type = bcf_get_variant_types (line );
2798+ int line_type = bcf_has_variant_types (line , VCF_ANY , bcf_match_overlap );
2799+ if (line_type < 0 ) error ("bcf_has_variant_types() failed." );
27982800 line_type = line_type ? line_type <<2 : 2 ;
27992801
28002802 // select relevant lines
@@ -2911,7 +2913,8 @@ void stage_line(args_t *args)
29112913 {
29122914 if ( buf -> rec [j ].skip ) continue ; // done or not compatible
29132915 if ( args -> collapse & COLLAPSE_ANY ) break ; // anything can be merged
2914- int line_type = bcf_get_variant_types (buf -> lines [j ]);
2916+ int line_type = bcf_has_variant_types (buf -> lines [j ], VCF_ANY , bcf_match_overlap );
2917+ if (line_type < 0 ) error ("bcf_has_variant_types() failed." );
29152918 if ( maux -> var_types & snp_mask && line_type & VCF_SNP && (args -> collapse & COLLAPSE_SNPS ) ) break ;
29162919 if ( maux -> var_types & indel_mask && line_type & VCF_INDEL && (args -> collapse & COLLAPSE_INDELS ) ) break ;
29172920 if ( maux -> var_types & ins_mask && line_type & VCF_INS && (args -> collapse & COLLAPSE_SNP_INS_DEL ) ) break ;
0 commit comments