Skip to content

bcftools reheader to support stdin? #2088

@clintval

Description

@clintval

I need to add reference sequences and their lengths from an FAI file and came across bcftools reheader. I can get it to work when reading from a file but not from standard input. Would it be possible to add this support so I can add this command in a pipestream without having to write a temporary VCF to disk?

$  gzip -dc test.vcf.gz | bcftools reheader /dev/stdin --fai reference.fa.fai --output /dev/stdout
[E::bcf_hdr_read] Input is not detected as bcf or vcf format
Failed to read the header: /dev/stdin

Whereas the same command works fine when reading from a normal file:

$ bcftools reheader test.vcf.gz --fai reference.fa.fai --output /dev/stdout
... <success!>

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions