Skip to content

bcftools regex filtering expressions produce extra debug output to stderr ("pass="...) #2491

@jkmatila

Description

@jkmatila

In bcftools versions 1.23 and 1.22, using regex filtering expressions produces extra lines into stderr which start with pass=.

Steps to reproduce:

Use regex expressions with bcftools view -i or -e.

Observed result: Produces extra stderr output to stderr for each regex expression evaluated:

$ bcftools view -e 'ALT~"whatever"' minimal.vcf > /dev/null
pass=0 [C]

This clutters stderr output making real errors and warnings harder to spot among the noise. Also with larger files, all the extra output slows the tool down.

Expected results: No extra stderr output produced.

minimal.vcf.gz

Version affected

$ bcftools --version
bcftools 1.23
Using htslib 1.23
Copyright (C) 2025 Genome Research Ltd.
License Expat: The MIT/Expat license
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Also affects version 1.22. Does not affect version 1.21.

Additional information

The line in question in the source code seems to be this:

bcftools/filter.c

Line 2891 in 56e72e4

fprintf(stderr,"pass=%d [%s]\n",rtok->pass_site,tok->str_value.s);

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