1
$\begingroup$

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)
$\endgroup$
1
  • 2
    $\begingroup$ What are you trying to do exactly? The -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 be resources-broad-hg38-v0-Homo_sapiens_assembly38.fasta and not resources-broad-hg38-v0-Homo_sapiens_assembly38.fasta.fai)? $\endgroup$
    – terdon
    Feb 28, 2022 at 21:29

1 Answer 1

2
$\begingroup$

Regarding a human genome reference, have a look at CHM13/HG002 from the Telomere-to-Telomere consortium:

https://github.com/marbl/CHM13#assembly-releases

The benefit of the T2T assembly is that it is fully-assembled across all repetitive regions, which improves the mapping accuracy. The pangenome consortium is working on additional T2T assemblies from other people, trying to capture as much human [structural] variation as possible.

https://humanpangenome.org/

The v2.0 assembly, adding chrY from HG002, has only just been released. From the looks of it, it is not yet annotated, but there's gene annotation for all other chromosomes via the v1.1 release:

https://github.com/marbl/CHM13#downloads

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.