Skip to contents

Wrapper for clump function using local plink binary and ld reference dataset

Usage

ld_clump_local(
  dat,
  clump_kb,
  clump_r2,
  clump_p,
  bfile,
  plink_bin,
  tmpdir = tempdir(),
  threads = NULL,
  memory = NULL
)

Arguments

dat

Dataframe. Must have a variant name column (variant) and pval column called pval. If id is present then clumping will be done per unique id.

clump_kb

Clumping kb window. Default is very strict, 10000

clump_r2

Clumping r2 threshold. Default is very strict, 0.001

clump_p

Clumping sig level for index variants. Default = 1 (i.e. no threshold)

bfile

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

Specify path to plink binary. Default = NULL. See https://github.com/MRCIEU/genetics.binaRies for convenient access to plink binaries

tmpdir

Directory in which to write the temporary files used by plink. Default = tempdir()

threads

Number of threads plink may use, passed as --threads. Default = NULL, plink's own default (all available cores)

memory

Memory in MiB plink may reserve, passed as --memory. Default = NULL, plink's own default (half the system's RAM)

Value

data frame of clumped variants