LD_prune: Perform LD pruning on SNP data

View source: R/LD_prune.R

LD_pruneR Documentation

Perform LD pruning on SNP data

Description

Uses PLINK clumping method ('–clump' command), where a greedy search algorithm is implemented to randomly select a variant (or the variant with the lowest p-value, if a user wish to), referred to as the index SNP, and remove all variants within a certain kb distance in linkage disequilibrium with the index SNP, based on an r-squared threshold from the 1000 Genomes reference panel phase 3 data. Then repeats until no variants are left.

Usage

LD_prune(
  dat,
  clump_kb = 250,
  clump_r2 = 0.1,
  Random = TRUE,
  clump_p1 = 1,
  local = FALSE,
  ref_pop = "EUR",
  ref_bfile,
  seed = 77777
)

Arguments

dat

Output from harmonise_effects. Must have a SNP name column (SNP).

clump_kb

Clumping window, default is 250.

clump_r2

Clumping r-squared threshold, default is 0.1.

Random

Logical, if TRUE (the default), SNPs will be randomly pruned. Otherwise, based on p-values.

clump_p1

Clumping sig level for index SNPs, default is 1.

local

Logical, if FALSE (the default), the MRC-IEU API 'http://gwas-api.mrcieu.ac.uk/' will be used for clumping. Otherwise, your local machine will be used for clumping given that you provide a bed/bim/fam LD reference dataset.

ref_pop

Super-population to use as reference panel at the API (when local is FALSE). Default = "EUR".

ref_bfile

Path to the bed/bim/fam LD reference (e.g. "1kg.v3/EUR" for local 1000 EUR ref. population file). If local=TRUE, then this should be provided.

seed

Random number seed for random pruning

Value

Data frame


Osmahmoud/SlopeHunter documentation built on Oct. 7, 2022, 4:38 p.m.