Learn R Programming

qgg (version 1.1.6)

getLDscores: Extract Linkage Disequilibrium (LD) Scores

Description

This function retrieves LD scores from a structured list (`Glist`) that includes LD scores, chromosome information, and SNP identifiers. You can extract all LD scores or filter them by a specific chromosome and/or SNP identifiers (rsids).

Usage

getLDscores(Glist = NULL, chr = NULL, rsids = NULL)

Value

A vector containing LD scores.

Arguments

Glist

A list structure containing genotypic data, including rsids for LD calculation (`rsidsLD`), LD file locations (`ldfiles`), and `msize` which indicates the size for surrounding region to consider for LD.

chr

A specific chromosome from which LD sets need to be extracted.

rsids

A vector of rsids that need to be included in the sparse LD matrix. Default is NULL, implying all rsids in the chromosome will be used.