Error [E::fai_build_core] in samtool faidx version 1.9
1
0
Entering edit mode
5.6 years ago

Hello, people.

I'm trying to convert a .sam file to a .vcf file.

Before, I mapped my reads using HISAT2. As a result, I generated a .sam file. Next, using SAMtools I converted my files to .bam file and after in a sorted.bam file.

Now, I'm trying to convert to .vcf using BCFtools1.9.

Before, I indexed I ref genome using SAMtools1.9

samtools-1.9/samtools faidx TriTrypDB-43_LbraziliensisMHOMBR75M2904_Genome.fa

Next, I trying to convert using this command:

bcftools-1.9/bcftools mpileup -Ou -f TriTrypDB-43_LbraziliensisMHOMBR75M2904_Genome.fa.fai MP_SRR1185719.sorted.bam | bcftools-1.9/bcftools call -Ov -m> MP_SRR1185719.vcf

As result:

[E :: fai_build_core] Format error, unexpected "L" at line 1

I searched here in Biostar more about this error, and I've tried a lot of sugestions, but I only failed.

At fisrt time, I thought that my reference genome was corrupted but I downloaded it again and insisted on the same error.

What else I can try to resolve that?

samtools • 7.2k views
ADD COMMENT
3
Entering edit mode
5.6 years ago

I believe the -f flag needs to be the fasta file, not the fai.

ADD COMMENT
0
Entering edit mode

The format fa.fai meaning that the file was indexed. If I use only file.fa, my terminal got unnormal like this.

ADD REPLY
0
Entering edit mode

Try setting the -o option rather than redirecting to a file.

ADD REPLY

Login before adding your answer.

Traffic: 1778 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