From ca920611fcd8be1180045589ac11bff2f04eafd8 Mon Sep 17 00:00:00 2001 From: James Bonfield Date: Mon, 7 Oct 2024 14:30:09 +0100 Subject: [PATCH] Fix minor inconsistency in test data. test/sam's test_bam_set1_write_and_read_back.tmp.bam file had mate information (rnext, pnext, tlen) for a record that was not paired. This triggers a CRAM "fix" where some, but strangley not all, of this was changed. Arguably CRAM should correct all 3 or none, but regardless the test data we are generating should be correct. --- test/sam.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/sam.c b/test/sam.c index 74591fc2d..9041e07e8 100644 --- a/test/sam.c +++ b/test/sam.c @@ -2254,7 +2254,7 @@ static void test_bam_set1_write_and_read_back(void) w_bam = bam_init1(); VERIFY(w_bam != NULL, "failed to initialize BAM struct."); r = bam_set1(w_bam, strlen(qname), qname, - BAM_FREVERSE, 0, 1000, 42, + BAM_FPAIRED | BAM_FREVERSE, 0, 1000, 42, sizeof(cigar) / 4, cigar, 0, 2000, 3000, strlen(seq), seq, qual, 64); VERIFY(r >= 0, "call to bam_set1() failed.");