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

i have a bed file

cat AMP_region.bed
chr1    157543538       157567870
chr1    160313062       160328742
chr1    163291722       163325553
chr2    85360582        85537511



samtools depth -a -b AMP_region.bed test.bam

above command no output anything. what is wrong?

i already tried removing prefix 'chr', but empty output...

samtools depth -a -r 1:50246462-59249785 test.bam
1       50246462        69
1       50246463        69
1       50246464        69

it is work well

Thus i think bed file is something wrong..

sequence gene sequencing

There you already have your answer. The chr prefix must be removed. Please show how you removed it in the first place (command line).

i followed this command line:

sed 's/chr//' AMP_region.bed

cat AMP_region.bed
1    157543538       157567870
1    160313062       160328742

This also output empty

1 answer

sorry, i solve this problem...

actually test.bam file is another directory. Thus i copy it in same directory ( bed, bam, bai)

Log in to answer this question.