When I trying to use bcftools mpileup to convert bam to vcf files, I try to use:
bcftools mpileup -Ob -o resources-broad-hg38-v0-Homo_sapiens_assembly38.fasta.fai input.bam
However, I got this error message:
[E::fai_build3_core] Failed to open the file resources-broad-hg38-v0-Homo_sapiens_assembly38.fasta.fai
Or, I would get another error message when I use another ref file:
[E::fai_build_core] Format error, unexpected "c" at line 1
Does anyone know how to solve these problems? Thanks in advance
Also, could anyone recommend some human gene Reference? The one I am using now is from GATK pipeline (but I don't know if that is good enough).
The version I am using is:
Program: bcftools (Tools for variant calling and manipulating VCFs and BCFs)
License: GNU GPLv3+, due to use of the GNU Scientific Library
Version: 1.10.2 (using htslib 1.10.2)
-o
option is to set an output file, and you seem to be trying to overwrite an existing fasta index (.fai
) file. Did you mean to use-f
to give the genome (which would beresources-broad-hg38-v0-Homo_sapiens_assembly38.fasta
and notresources-broad-hg38-v0-Homo_sapiens_assembly38.fasta.fai
)? $\endgroup$