Freebayes Error not recognizing fasta or bam file
0
0
Entering edit mode
6.5 years ago

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

software error gene alignment Assembly genome • 4.9k views
ADD COMMENT
1
Entering edit mode

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).

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
1
Entering edit mode

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 freebayes

ADD REPLY
1
Entering edit mode

That was it!! Thanks so much for the help!!!!!!!!! Would have been lost forever!

ADD REPLY
0
Entering edit mode

Is there an updated manual that I can look at?

ADD REPLY
1
Entering edit mode

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

ADD REPLY
1
Entering edit mode

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.

ADD REPLY

Login before adding your answer.

Traffic: 1515 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6