Bcftools 1.16 able to add F_MISSING tag?

127 Views Asked by At
  1. List item

I tried adding the F_MISSING tag using bcftools 1.16. When I run this command: bcftools +fill-tags input.vcf.gz -- -t 'F_MISSING' | bcftools view -i 'INFO/F_MISSING<0.25' -Oz -o output.vcf.gz

I get the following error: Error parsing "--tags F_MISSING": the tag "F_MISSING" is not supported

This command runs fine using bcftools 1.15. However, version 1.15 gives complications with other packages I use in my snakefile. Do you maybe know alternatives for how to add F_MISSING using bcftls 1.16?

I installed bcftools1.16 in a newly created conda env using conda install -c bioconda bcftools as indicated on https://anaconda.org/bioconda/bcftools

When I type bcftools +fill-tags --version:

bcftools 1.9 using htslib 1.9

plugin at 1.9 using htslib 1.9

##SOLUTION##

Indeed the issue was that I was not installing the most recent version of Conda. I solved it by changing the .condarc file to solelely include the following lines:

channels:
    - conda-forge
    - bioconda
    - defaults

The order is crucial as well.

1

There are 1 best solutions below

5
On

I'm only giving a partial answer here:

However, version 1.15 gives complications with other packages I use in my snakefile.

You could work around this by making snakemake use a dedicated conda environment for the rule(s) needing bcftools 1.15. E.g.:

rule fill_tags:
    input:
        ...
    output:
        ...
    conda:
        "envs/bcftools-1.15.yaml"
    shell:
        r"""
        bcftools +fill-tags {input.vcf} -- -t 'F_MISSING' \
        | bcftools view -i 'INFO/F_MISSING<0.25' -Oz -o {output.vcf}
        """

Where envs/bcftools-1.15.yaml contains something like:

dependencies:
  - bcftools=1.15

then run snakemake with flag --use-conda