subset_common_snps: Subset LD matrix and dataframe to only their shared SNPs

View source: R/subset_common_snps.R

subset_common_snpsR Documentation

Subset LD matrix and dataframe to only their shared SNPs

Description

Find the SNPs that are shared between an LD matrix and another data.frame with a "SNP" column. Then remove any non-shared SNPs from both objects.

Usage

subset_common_snps(
  LD_matrix,
  dat,
  fillNA = 0,
  as_sparse = TRUE,
  verbose = FALSE
)

Arguments

LD_matrix

LD matrix.

dat

SNP-level summary statistics subset to query the LD panel with.

fillNA

Value to fill LD matrix NAs with.

as_sparse

Convert LD_matrix to sparse matrix before returning.

verbose

Print messages.

Value

data.frame

Examples

out <- echoLD::subset_common_snps(LD_matrix = echodata::BST1_LD_matrix,
                                  dat = echodata::BST1)

RajLabMSSM/echoLD documentation built on May 12, 2024, 3:23 a.m.