Samtools index and sambamba-depth error?
0
0
Entering edit mode
8 days ago
MobiusT ▴ 10

I have the following script

samtools index dataset01.bam
basename dataset01.bam
f="$(basename -- dataset01.bam)"
sambamba depth base -L genomic.bed dataset01.bam > ./read_depths/"$f.txt"

I run this script with a whole genome dataset and after that is gives the following error.

samtools index: failed to create or write index
dataset001.bam
sambamba-depth: All files must be coordinate-sorted

What can be the reason for this and it takes more than half a day running so any help could save my time.

I use a conda environment and use the following versions

  • sambamba=0.6.6=2
  • samtools=1.7=1
linux samtools indexing sambamba • 156 views
ADD COMMENT
0
Entering edit mode
samtools index: failed to create or write index

you first have to find why samtools failed at this point: is the bam sorted on coordinate ? is the directory writeable ? etc....

ADD REPLY

Login before adding your answer.

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