Query a (remote) Variant Call Format (VCF) file.

query_vcf(
  dat,
  vcf_url,
  locus_dir = file.path(tempdir(), "LD"),
  vcf_name = gsub(".vcf|.gz.|bgz", "", basename(vcf_url)),
  ref_genome = "GRCh37",
  samples = NULL,
  force_new_vcf = FALSE,
  verbose = TRUE
)

Arguments

dat

SNP-level data table.

vcf_url

URL or path to VCF.

locus_dir

Directory to store LD in.

vcf_name

VCF reference name (e.g. "1KGphase1").

ref_genome

Genome build of the VCF file.

samples

Sample names to subset the VCF by before computing LD.

force_new_vcf

Force the creation of a new LD file even if one exists.

verbose

Print messages.

Value

VCF object.