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
you first have to find why samtools failed at this point: is the bam sorted on coordinate ? is the directory writeable ? etc....