Question: (Closed) Samtools (Bcftools) Error Regarding Fields For Mpileup
gravatar for Jlw
6.1 years ago by
Jlw180 wrote:

Been struggling with a new error that has popped up with calling variants with samtools, using mpileup

Current command:

samtools mpileup -C50 -Q 20 -q 20 -B -I -S -f ../Pila.88.seeds.fasta pila.s1.sort.nodup.bam pila.s2.sort.nodup.bam pila.s5.sort.nodup.bam | bcftools view -bvcg - > pila.var.raw.bcf


[mpileup] 3 samples in 3 input files
<mpileup> Set max per-file depth to 2666
[bcf_sync] incorrect number of fields (0 != 5) at 0:0
[afs] 0:0.000

I have tried stripping everything down to one bam file, no specific parameters but it's always the same error. The bam files themselves are fine, not corrupted as I was able to sort, index, etc without issue. I did perform a conversion from sam to bam following a bwa mapping step and perhaps that could be a problem. The conversion was performed in samtools with view however and this was repeated again to ensure no errors come from there.

I just pulled the latest code as posts indicate issues similar to this have been resolved...

samtools bcftools snp mpileup • 4.0k views
ADD COMMENTlink modified 6.1 years ago • written 6.1 years ago by Jlw180

Could you run Picard ValidateSamFile on your bam-alignment and post what that says?

ADD REPLYlink written 6.1 years ago by Philipp Bayer6.0k
gravatar for Jlw
6.1 years ago by
Jlw180 wrote:

Found the error in my ways. Missed a very critical -u flag in the mpileup line to produce the uncompressed bcf.

ADD COMMENTlink written 6.1 years ago by Jlw180
Please log in to add an answer.
The thread is closed. No new answers may be added.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2306 users visited in the last hour