Updating filter syntax and threshold ?

Open
#2,101 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
32/100
Issue type
Documentation
Clarity
Needs clarification
Activity status
Stale

Research direction

Review the “Filtering variants” page at https://samtools.github.io/bcftools/howtos/variant-calling.html and compare its examples with the bcftools 1.18 commands and thresholds shown here. Check the G1K dataset as proposed, then update the affected examples only if the syntax or thresholds are confirmed outdated; done means the documentation matches the validated filtering guidance.

Written by the indexing model from the issue text.

Description

documentation enhancement

I could be very wrong. The syntax and threshold values in the example might be outdated in Filtering variants on https://samtools.github.io/bcftools/howtos/variant-calling.html:

bcftools filter -sLowQual -g3 -G10 \
    -e'%QUAL<10 || (RPB<0.1 && %QUAL<15) || (AC<2 && %QUAL<15) || %MAX(DV)<=3 || %MAX(DV)/%MAX(DP)<=0.3' \
    calls.vcf.gz

I am using the following on bcftools_filterVersion=1.18+htslib-1.18 with a public GRCh38 dataset from PacBio:

bcftools filter -sLowQual -g3 -G10 \
    -e 'QUAL<100 || (RPBZ<0.1 && QUAL<150) || (AC<2 && QUAL<150) || VDB<1.0e-04' \
    "${input_vcf}" -Oz -o "${output_dir}/filtered.vcf.gz" --write-index

So might be the other examples in "Filtering variants".

P.S. I am going to try the filter on the G1K dataset next to understand if the filter can be generic enough.

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.