This function takes a list of variants and searches for them in samples from 1000 Genomes phase 3 data It then creates an LD matrix of r values (signed, and not squared) All LD values are with respect to the major alleles in the 1000G dataset. You can specify whether the allele names are displayed

ld_matrix(
  variants,
  with_alleles = TRUE,
  pop = "EUR",
  bfile = NULL,
  plink_bin = NULL
)

Arguments

variants

List of variants (rsids)

with_alleles

Whether to append the allele names to the SNP names. Default: TRUE

pop

Super-population to use as reference panel. Default = "EUR". Options are EUR, SAS, EAS, AFR, AMR

bfile

If this is provided then will use the API. Default = NULL

plink_bin

If null and bfile is not null then will detect packaged plink binary for specific OS. Otherwise specify path to plink binary. Default = NULL

Value

Matrix of LD r values