Skip to content

bcftools index does not support indexing from stdin / stream #2494

@aurmra1

Description

@aurmra1

Hi,

I have been trying to index a VCF using bcftools index from stdin (streaming), but it does not seem to be supported, even when the input is BGZF-compressed.

Here are the commands I tested:

cat PP0087.uber_vep_tabix_qc.2018-12-20.vcf.gz | bcftools index - -o /tmp/index.o
# index: the input is probably truncated, use -f to index anyway: -

zcat PP0087.uber_vep_tabix_qc.2018-12-20.vcf.gz | bcftools index - -o /tmp/index.o
# index: the file is not BGZF compressed, cannot index: -

zcat PP0087.uber_vep_tabix_qc.2018-12-20.vcf.gz | bgzip | bcftools index - -o /tmp/index.o
# index: the input is probably truncated, use -f to index anyway: -

However, indexing the same file directly works as expected:

bcftools index PP0087.uber_vep_tabix_qc.2018-12-20.vcf.gz

Please let me know if I am missing something, or if there is any recommended workaround other than writing the file to disk first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions