What is the algorithm or formula for converting SAM to BAM?
2
0
Entering edit mode
6.7 years ago
Karma ▴ 310

I have seen some tools which converts SAM to BAM format. I wanted to know how they are converted. SAM file contains nucleotides (A, T, G, C) and how these data are converted to binaries?

NGS Samtools SAM BAM • 1.6k views
ADD COMMENT
1
Entering edit mode
6.7 years ago
GenoMax 141k

Section 4 page 11. SAM file contains more than just nucleotides. Original paper from Heng et al here.

ADD COMMENT
1
Entering edit mode
6.7 years ago

You'll want to read the BAM specification. In short, bases are encoded as 4 bit integers (see section 4.2).

ADD COMMENT

Login before adding your answer.

Traffic: 1978 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6