Skip to content

Commit

Permalink
Merge pull request #2515 from eseiler/fix/bam
Browse files Browse the repository at this point in the history
[FIX] Missing SQ header in BAM output
  • Loading branch information
eseiler committed Apr 12, 2024
2 parents 45fa07b + ba90299 commit db5e0ce
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions include/seqan/bam_io/write_bam.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@ void write(TTarget & target,
write(target, "BAM\1");
clear(context.buffer);

// Create text of header.
for (unsigned i = 0; i < length(header); ++i)
write(context.buffer, header[i], context, Sam());
write(context.buffer, header, context, Sam());

// Note that we do not write out a null-character to terminate the header. This would be valid by the SAM standard
// but the samtools do not expect this and write out the '\0' when converting from BAM to SAM.
Expand Down

0 comments on commit db5e0ce

Please sign in to comment.