I am trying to calculate depth by region using samtools depth command to extract depth information for specific region in chromosome_3 in a bam file.bam
I indexed the bam file using samtools index bamfile.bam to bamfile.bam.bai
when I typed samtools depth -r chromosome_3:10001-10010 bamfile.bam.bai
it gave erorr : could not open "bamfile.bam.bai" : Success how it could not open the bam.bai file and count it as success?
any help would be highly apprciated