I'm trying to use freebayes but I keep running into this problem. Does anyone know who to fix this? I was looking at this tutorial for commands but it doesn't seem to work. I can seem to get it to recognize my fasta file or my .bam file. I don't know if I did something wrong or what.
./freebayes -f felCat8.fa --region E2:1-100000 \ test.bam >test.vcf
index file felCat8.fa.fai not found, generating...
ERROR(freebayes): Could not open input BAM files
BamMultiReader::Open: unable to open all files:
unable to open file: test.bam
I have also tried and got the same error
./freebayes -f felCat8.fa -b test.bam >test.vcf
Running it like that, it will look for the BAM file in your current working directory - is it indeed located there?
It will also look for the FASTA file in the current working directory, and also its index (fa.fai).
Yes, both files are in the current working directory. Freebayes generates that fa.fai file when I run the script. During this "index file felCat8.fa.fai not found, generating..." segment the fa.fai file is created.
Okay, and should there not be a space between > and test? Otherwise, freebayes could be assuming that there's a BAM file call '>test'
Why not specify the output file with
-v --vcf FILE
? The tutorial that you reference may have been done with an older version of freebayesThat was it!! Thanks so much for the help!!!!!!!!! Would have been lost forever!
Is there an updated manual that I can look at?
To be honest, I have never actually used freebayes but I just spotted that part by chance. Actually, I first spotted it in the tutorial to which you linked and thought 'hmmm, that's likely to cause some issues for people following the tutorial'. I then realised that it was what was causing you some problems too.
This appears to be the main page for freebayes: https://github.com/ekg/freebayes Here is another page by the authors: https://arxiv.org/abs/1207.3907
I appreciate the help! Hopefully, I can one-day spot issues like that haha. I actually found a page with the full list of commands https://wiki.gacrc.uga.edu/wiki/Freebayes.