This is a test version of Biostars. For the public version, visit https://www.biostars.org.
vcf file format

Hi all,

I have been trying to convert my bam file to vcf file by using freebayes

This is the command I am using

freebayes -f genome.fa SRR1158613_hisat2_sorted.bam >SRR1158613.vcf 

where genome is the reference genome used

This is the error message I'm getting

index file genome.fa.fai not found, generating... 

I'm not understanding the error if anybody could help me with this

Thanks

freebayes vcf

genome.fa should have been indexed with samtools faidx genome.fa. It seems that it is just a warning and freebayes is able to do this itself.

your title "vcf file format" is unrelated to your problem.

yeah this worked but i was getting one more error

samtools error while loading shared libraries libncurses.so.5

and i solve this by

sudo apt-get install libncurses5n -64 bits

sudo apt-get install lib32z1

i think its irrelevant to what i questioned but i thought of posting this so if anybody gets such error can solve it

1 answer

That is not an error but a warning message. An index file for the genome is needed (created using samtools faidx genome.fa). If freebayes is unable to create it i.e. the process stalls then you can pre-create that in the directory where you genome is located by using samtools command above.

I know you know , samtools index is for bam files :-)

Corrected :-)

Log in to answer this question.