Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Silvia-lme opened this issue Sep 27, 2024 · 1 comment

Comments

@Silvia-lme
Copy link

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!

@pd3
Copy link
Member

pd3 commented Oct 10, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants