bcftools icon indicating copy to clipboard operation
bcftools copied to clipboard

Error "Failed to read from standard input: unknown file type" with Gzipped BAM Files

Open Silvia-lme opened this issue 1 year ago • 1 comments

I’m using bcftools (v. 1.20) for variant calling with mpileup and bcftools call, but I’m encountering the following error message: "Failed to read from standard input: unknown file type".

I’m using the -b bam_files.txt option, which includes a list of my BAM files (e.g., a.bam.gz, b.bam.gz, etc.). I suspect the issue is related to my BAM files being gzipped. Unfortunately, due to their large size, I don’t have enough space to unzip them.

Is there a way to use gzipped BAM files directly in the variant calling analysis? Any guidance would be appreciated.

Thanks!

Silvia-lme avatar Sep 27 '24 16:09 Silvia-lme

Uh, out of curiosity, how much space are you gaining by compressing bams with gzip? It must be by a negligible amount, as bams are already bgzip-compressed. If the size is still an issue, you should use cram instead. Both bams and crams are supported natively by samtools and bcftools.

pd3 avatar Oct 10 '24 11:10 pd3