bcftools mipileup error: format error, unexpected A at line 1
0
0
Entering edit mode
5 months ago
jiyoung ▴ 20

I had a problem using bcftools. After using the command line(below): there is some error in my results. The error message stated: "Note: none of --samples-file, --ploidy or --ploidy-file given, assuming all sites are diploid

[E::fai_build_core] Format error, unexpected "A" at line 4 

Failed to read from standard input: unknown file type"

 bcftools mpileup -f A.fasta out.bam | bcftools call -mv -Ob -o out.bcf

there is problem in my index file? i using bwa tool to make index file.

bwa index A.fasta

enter image description here

This is my index file (A.fasta)

Thank you in advance for your help.

bcftools • 562 views
ADD COMMENT
1
Entering edit mode

i using bwa tool to make index file.

bcftools wants an index created with samtools faidx (describe the number of chromosomes and the lengths of the fasta lines) , not bwa index (index for mapping with bwa)

ADD REPLY
0
Entering edit mode

Format error, unexpected "A" at line 4

i suspect your fasta file is a windows file with CRLF lines. https://en.wikipedia.org/wiki/Newline#Issues_with_different_newline_formats ? if true: https://www.cyberciti.biz/faq/how-to-remove-carriage-return-in-linux-or-unix/

ADD REPLY
0
Entering edit mode

My FASTA file was not downloaded from a database. My fasta file was created by converting a txt file to FASTA format. How can I resolve these problems?

ADD REPLY
0
Entering edit mode

My fasta file was created by converting a txt file to FASTA format.

what does that mean ?

How can I resolve these problems?

see the second link

ADD REPLY
0
Entering edit mode

You can usually fix it with the dos2unix command

ADD REPLY

Login before adding your answer.

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