samtools return seek position
I was wondering if there is a way to return byte ranges instead of a slice with samtools view on a bam file?
In other words, with samtools view -bh foo.bam 1:10-100,
it returns a pair of ints (start_byte_pos, end_byte_pos) for the resulting query, or a list of such pairs if the data are not located contiguously in the foo.bam.
• 1,431 views
•
link
1 answer
You can't get that with the command line program. If you really need that information, then I presume you're programming anyway, so you'll want to look at htslib, which underlies samtools and provides the functionality that you're looking for.
• 0 views
•
link
Log in to answer this question.