This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Samtools depth input

Hello everyone,

I have a genebank file that I want to convert to bed to use as samtools depth input. I used this script: But start positions are actual start positions minus 1

start = feature.location.start.position stop = feature.location.end.position

for example if a gene starts from 350 to 2000 in gb file, in the bed format it's 349 to 2000, but again samtools depth results start from 350!

Is the converting script correct, or should I use start = feature.location.start.position+1

Thank you for your time.

rna-seq samtools bed

The output is simply 1-based, right?

1 answer

This should prove useful: Cheat Sheet For One-Based Vs Zero-Based Coordinate Systems

BED format is zero-based.

Log in to answer this question.