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

Open
#2,293 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale

Research direction

The report only identifies bcftools mpileup and call, the -b bam_files.txt option, and example .bam.gz inputs; it names no source file or test. Start by checking how the -b input list is parsed and how BAM paths are opened, then reproduce the reported error with the stated command pattern. Done means establishing whether the documented input format supports these files and recording the verified behavior or a narrowly scoped fix.

Written by the indexing model from the issue text.

Description

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!

Dominant language
C
Stars
891
Forks
277
Avg merge
2d 23h
Merged PRs (30d)
2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from samtools/bcftools

All issues in samtools/bcftools

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.