Learn R Programming

pleioh2g (version 0.1.1)

read_ld: Read ld from either internal or external file - refer to ldscr R package (https://github.com/mglev1n/ldscr)

Description

`read_ld()` Read ld from either internal or external file.

Usage

read_ld(ld)

Value

A data frame (tibble) containing LD score information read from the specified directory. Each row corresponds to a SNP, and columns typically include:

  • CHR: Chromosome number.

  • SNP: SNP identifier (rsID).

  • BP: Base pair position.

  • L2: LD score value.

  • M: Number of SNPs used in the LD score computation.

Arguments

ld

(character) Path to directory containing ld score files, ending in `*.l2.ldscore.gz`. Default is `NA`, which will utilize the built-in ld score files from Pan-UK Biobank for the ancestry specified in `ancestry`.