Hey all,
I have a sorted and indexed .bam file, and I am running it through freebayes, with the script : "freebayes -f /path/to/reference.fasta Bamfile.bam > NewVCF_file.vcf" I have in the directory I am running this script from, and in the directory that the reference file is in the index files for the reference, the .fai and .dict files. Every time I run this script I get the "Unable to find FASTA index entry for 'unitig_2993_pilon error. " Even know I have the index files.
I have gone back and used Picard tools to remake the .dict file and used the samtools faidx command to make the .fai reference file.
Is there something I'm not doing? I have the correct Bam file and index files and it just continually throws the indexing error. What could be the problem here?
Hello,
a dict file isn't needed for freebayes. What is the output of:
and
fin swimmer
Nothing happened for either? the command didn't run a error, but didn't return any input either.
Hello again,
grep
should print out lines that containunitig_2993_pilon
. If you're not getting any output, there are no such lines.I would guess you're using a different reference for freebayes, than for the one used to generate the bam file. Let's check:
grep "^>" /path/to/reference.fasta
and
samtools view -H Bamfile.bam
Please use the formatting bar (especially the
code
option) to present the output.The reference fasta that I used to generate the bam file is the same one I am trying to read with freebayes now. And I ran
grep "^>" /path/to/reference.fasta
on the fasta file, and got no output from it.I ran
samtools view -H Bamfile.bam
and got the following output