1

Closed

bcftools view doesn't read from stdin correctly

description

This does not work:
 
C:\Users\jlick\Desktop\DNA\James Lick>samtools view -u LF7687.bam MT | samtools mpileup -uf rCRS.fasta - | bcftools view -v - > out.vcf
[mpileup] 1 samples in 1 input files
<mpileup> Set max per-file depth to 8000
[bcf_sync] incorrect number of fields (0 != 5) at 0:0
[afs] 0:0.000 1:0.000 2:0.000
 
(The resulting VCF file has a header only.)
 
However, splitting it in two works:
 
C:\Users\jlick\Desktop\DNA\James Lick>samtools view -u LF7687.bam MT | samtools
mpileup -uf rCRS.fasta - > LF7687.pileup
[mpileup] 1 samples in 1 input files
<mpileup> Set max per-file depth to 8000
 
C:\Users\jlick\Desktop\DNA\James Lick>bcftools view -v LF7687.pileup > out.vcf
[afs] 0:207.931 1:1.257 2:28.812
 
As a more generalized case, "bcftools view file" works while "bcftools view - < file" does not.
Closed Jun 12, 2012 at 2:48 PM by xied75
Bug due to stdin opened as Text mode. Fixed now.

comments

xied75 wrote Jun 12, 2012 at 2:46 PM

Thanks for the feedback. Fixed now, please download the new release.

wrote Jun 12, 2012 at 2:48 PM

wrote Feb 14, 2013 at 8:35 PM

wrote May 16, 2013 at 9:44 AM