VCF-QUERY(1)

πŸ’– VCF-QUERY(1) πŸ’–

okay bestie, sit down, hydrate, because today we're reading a page from User Commands (section 1 of the manual, aka the place where the actual runnable commands live) about a little icon called vcf-query. it queries VCF files. that's the whole plot 🧬✨


🌸 NAME 🌸

vcf-query β€” query VCF files.

short, sweet, to the point, main character energy, no notes πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

query-vcf [OPTIONS] file.vcf.gz

not me pointing out that the page is called vcf-query but the synopsis spells the command query-vcf πŸ™ˆ iykyk, just read it as written, don't come for me.


πŸ‘‘ OPTIONS πŸ‘‘

  • -c, --columns <NA001,NA002,..> β€” hand it a list of column names, comma-separated, and that's what you get. it's giving "pick your faves" πŸŽ€
  • -f, --format <string> β€” your format string, your rules. the default is '%CHROM:%POS\t%REF[\t%SAMPLE=%GT]\n' β€” literally that, tabs and all ✨
  • -l, --list-columns β€” just list the columns. a lil menu, a lil vibe check πŸ¦‹
  • -r, --region chr:from-to β€” grab a region. heads up: this one runs tabix under the hood, so tabix is doing the heavy lifting πŸ”₯
  • -h, -?, --help β€” this help message. hi, hello, help is here 🫢

πŸ“ EXAMPLES πŸ“

okay so the manpage prints the examples like this, all squished together with the line breaks wherever they landed, and i'm not about to edit a single character of them. here they are, exactly:

query-vcf file.vcf.gz 1:1000-2000 -c NA001,NA002,NA003 query-vcf
file.vcf.gz -r 1:1000-2000 -f
'%CHROM:%POS\t%REF[\t%SAMPLE:%*=,]\n' query-vcf file.vcf.gz -f
'[%GT\t]%LINE\n' query-vcf file.vcf.gz -f
'%CHROM\t%POS\t%INFO/DP\t%FILTER\n'

and here's the exact same text, same characters, just un-wrapped so your eyeballs can survive:

  1. query-vcf file.vcf.gz 1:1000-2000 -c NA001,NA002,NA003
  2. query-vcf file.vcf.gz -r 1:1000-2000 -f '%CHROM:%POS\t%REF[\t%SAMPLE:%*=,]\n'
  3. query-vcf file.vcf.gz -f '[%GT\t]%LINE\n'
  4. query-vcf file.vcf.gz -f '%CHROM\t%POS\t%INFO/DP\t%FILTER\n'

four little baddies, four lil ways to pull stuff out of a VCF. ate, honestly 🌈


and that's the page bestie 🫢 it's vcf-query 0.1.5, dated July 2011, straight from the footer of the original β€” so yeah, she's vintage, she's iconic, she's still serving. periodt. πŸ’œ