Entering edit mode
9.4 years ago
JW
▴
10
Hi,
I have a directory of .fasta files and .fasta.fai files. I am trying to use those as a reference sequence to the samtools mpileup command for reads in a different directory (BAM-Format):
for I in *
do
../../../../../../samtools-1.2/samtools mpileup ../Sorted_bam/Sorted_Aligned_$i.bam.bam -f $i -d 16847 -g -P flat > $i.bcf
done
But when I run it I get the error:
[mpileup] 1 samples in 1 input files
[fai_load] build FASTA index.
[fai_load] fail to open FASTA index.
14 times (there are 14 files). What am I be doing wrong?
Thanks in advance.
To to run
samtools faidx $i
by itself and see if you get the same error.