Learn R Programming

pleioh2g (version 0.1.1)

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

Description

`read_sumstats()` Read summary statistics from either internal or external file

Usage

read_sumstats(munged_sumstats, name)

Value

A data frame (tibble) containing GWAS summary statistics for the specified trait. The returned object will always contain at least the following columns:

  • SNP: SNP identifier (rsID).

  • A1: Effect allele.

  • A2: Non-effect allele.

  • N: Total sample size for the SNP.

  • Z: Z-score of SNP-trait association.

Arguments

munged_sumstats

Either a dataframe, or a path to a file containing munged summary statistics. Must contain at least columns named `SNP` (rsid), `A1` (effect allele), `A2` (non-effect allele), `N` (total sample size) and `Z` (Z-score)

name

trait name