make_mamba_summary_files: Create input datasets for mamba() function and clumping Take...

Description Usage Arguments Value Examples

View source: R/make_mamba_summary_files.R

Description

Create input datasets for mamba() function and clumping

Take gwas summary stat files, do ivw-meta-analysis, create an assoc dataset which could be used for clumping association statistics in plink, create beta and s2 input datasets for mamba() model

Usage

1
2
3
4
make_mamba_summary_files(summary_files,
  standardize_beta_and_s2_datasets = TRUE, beta_name = "b",
  s2_name = "s2", n_name = "n", af_name = "af", ref_name = "ref",
  alt_name = "alt", chr_name = "chr", bp_name = "bp")

Arguments

summary_files

A list of summary statistic files with common column names

standardize_beta_and_s2_datasets

in the outputted b and s2 data tables, do you want the effect size estimates and variances standardized (i.e. beta = beta_k*sqrt(2*af_k*(1-af_k)))? Default is TRUE.

beta_name

name of effect size estimate column

s2_name

name of effect size variance estimate column

n_name

name of n column

af_name

name of af column

ref_name

name of reference allele column

alt_name

name of alt allele column

chr_name

name of chr column

bp_name

name of bp column

Value

a list of three data.tables (beta, s2, and assoc)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
 ## Not run: 
    datadir<-system.file("extdata", package="mamba")
    datafiles<-paste0(datadir, "/", list.files(datadir))
    looky<-make_mamba_summary_files(summary_files=datafiles, 
                             standardize_beta_and_s2_datasets=TRUE,
                             beta_name="betaj", s2_name="sj2")
    looky$assoc[1:5]
    looky$b[1:5] 
    looky$s2[1:5]

## End(Not run)

dan11mcguire/mamba documentation built on Nov. 10, 2020, 12:37 a.m.