Question: Freebayes Error not recognizing fasta or bam file
0
gravatar for williamsbrian5064
21 months ago by
williamsbrian5064170 wrote:

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

ADD COMMENTlink modified 21 months ago by Kevin Blighe45k • written 21 months ago by williamsbrian5064170
1

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 REPLYlink written 21 months ago by Kevin Blighe45k

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 REPLYlink written 21 months ago by williamsbrian5064170
1

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 REPLYlink written 21 months ago by Kevin Blighe45k
1

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

ADD REPLYlink written 21 months ago by williamsbrian5064170

Is there an updated manual that I can look at?

ADD REPLYlink written 21 months ago by williamsbrian5064170
1

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 REPLYlink written 21 months ago by Kevin Blighe45k
1

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 REPLYlink written 21 months ago by williamsbrian5064170
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1582 users visited in the last hour