VCF_FILTER(1)

πŸ’– VCF_FILTER(1) πŸ’–

okay bestie, gather round, because today we're talking about vcf_filter from section 1 of the manual β€” the little script that filters your VCF files. it's giving "I have a very specific job and I do it beautifully." 🧚


✨ NAME ✨

vcf_filter β€” filter a VCF file. that's it, that's the whole vibe. πŸŽ€


🌸 SYNOPSIS 🌸

vcf_filter [-h] [--no-short-circuit] [--no-filtered] [--output OUTPUT]
[--local-script LOCAL_SCRIPT] input filter [filter_args] [filter
[filter_args]] ...

look at that. a whole parade of filters. we love to see it. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so this script is part of PyVCF. yes, that PyVCF. the one you already know and love. no cap. ✨


πŸ‘‘ OPTIONS πŸ‘‘

🌈 positional arguments

  • input β€” the file you wanna process. and listen, if you pass - it reads from STDIN instead, which is lowkey iconic of it. (default: None)

πŸ’œ optional arguments

  • -h, --help β€” shows you this help message and then dips. (default: False)
  • --no-short-circuit β€” by default, the second any filter triggers on a site, processing for that site stops. this flag says "no, keep going." don't stop the filter processing on a site if any filter is triggered. (default: False)
  • --output OUTPUT β€” the filename to write out to. it's [STDOUT] by default, and the default is literally this whole mood: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='ANSI_X3.4-1968'> 😭 (default: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='ANSI_X3.4-1968'>)
  • --no-filtered β€” outputs only the sites that passed the filters. filtered ones? gone. blocked. unfollowed. (default: False)
  • --local-script LOCAL_SCRIPT β€” a Python file sitting in your current working directory that holds the filter classes. (default: None)

πŸ“ mgq

filters out sites that have only low quality variants. and here's the thing, bestie β€” you can absolutely have a high site quality while still having a ton of low quality calls underneath it. this filter isn't fooled. it demands at least one call be above a threshold quality. periodt.

  • --genotype-quality GENOTYPE_QUALITY β€” filters sites with no genotypes above this quality. (default: 50)

⭐ snp-only

chooses only SNP variants. just SNPs. nothing else invited to the party.


πŸ”₯ dps

thresholds the read depth per sample.

  • --depth-per-sample DEPTH_PER_SAMPLE β€” the minimum required coverage in each sample. (default: 5)

🌈 avg-dps

thresholds the average read depth per sample, which it works out as read_depth / sample_count. math girlies rise. 🧚

  • --avg-depth-per-sample AVG_DEPTH_PER_SAMPLE β€” the minimum required average coverage per sample. (default: 3)

πŸ’€ eb

okay this one is the main character. it filters sites that look like correlated sequencing errors. some sequencing technologies β€” notably pyrosequencing β€” produce mutation hotspots where there's a constant level of noise, producing some reference and some heterozygote calls. so this filter computes a Bayes Factor for each site by comparing the binomial likelihood of the observed allelic depths under:

  • a model with constant error equal to the MAF.
  • a model where each sample is the ploidy reported by the caller.

the test value is the log of the bayes factor. higher values are more likely to be errors. πŸ‘€

⚠️ note: this filter requires rpy2. no rpy2, no eb. sorry bestie.
  • --eblr EBLR β€” filters sites above this error log odds ratio. (default: -10)

🫢 sq

filters low quailty sites. (yes, "quailty". we're keeping it. iconic typo behaviour, no notes. πŸ’…)

  • --site-quality SITE_QUALITY β€” filters sites below this quality. (default: 30)

πŸŽ€ a lil sign-off

that's the whole page, bestie. this was PyVCF version 0.6.7, dated October 2015, and it lives in section 1 of the manual under VCF_FILTER(1). go filter something. slay. πŸ¦‹πŸ’–βœ¨