load_gwas.RdThis 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
load_gwas(f, maf.DT, ld.gr, n.cases, n.controls, plink = FALSE)
| 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. |
a data.table of annotated GWAS variants suitable for COGS analysis