samtools return seek position
1
0
Entering edit mode
6.7 years ago
peiqi1122 • 0

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.

samtools bam • 1.1k views
ADD COMMENT
4
Entering edit mode
6.7 years ago

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.

ADD COMMENT

Login before adding your answer.

Traffic: 2693 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