load_gwas: This function loads and checks set of univariate P values for...

Description Usage Arguments Value

View source: R/gwas.R

Description

This function loads and checks set of univariate P values for a given trait and adds posterior probabilities for each SNP to be causal using Wakefield's aBF

Usage

1
load_gwas(f, maf.DT, ld.gr, n.cases, n.controls, plink = FALSE)

Arguments

f

character scalar representing GWAS file to load, tab delimited with three columns chr,pos and p

maf.DT

a data.table of reference MAFs created by load_ref_maf

ld.gr

a GenomicRanges object of LD regions created by load_ld_regions

n.cases

a scalar for the number of GWAS cases - this should equal sample size in the case of a quantitative trait

n.controls

a scalar for the number of GWAS controls - this should be omitted in the case of a quantitative trait

plink

a boolean as to whether input format is PLINK rather than the cannonical type described above.

Value

a data.table of annotated GWAS variants suitable for COGS analysis


ollyburren/rCOGS documentation built on Aug. 5, 2020, 2:13 p.m.