Samtools depth with 0-based BED file
1
0
Entering edit mode
23 months ago
loy_loy ▴ 10

Hi everyone,

I have a question about using samtools with a BED file as input for coordinates. I used samtools depth with a zero-based BED file and I get one-based coordinates as output. For example, for the range chr1 9 10 in my BED file, I get the position chr1 10 as output from samtools. I assume that I would have to subtract 1 from the SAM positions to reformat to zero-based coordinates.

Am I doing this correctly?

Best
Lynn

samtools sam bam bed • 750 views
ADD COMMENT
0
Entering edit mode
23 months ago
ATpoint 82k

Yes, samtools output is 1-based. See e.g. https://github.com/samtools/samtools/issues/1063

ADD COMMENT

Login before adding your answer.

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