An R Package for Causal Mediation Analysis of ROSMAP Data

Overview

GeneticMediation was created as part of the UNC Wu Lab project Constructing Causal Mediation Pathways For Multi-Level Genomic Data

GeneticMediation provides methods for cleaning and processing data from the ROSMAP study and preparing it for causal mediation analysis.

The documentation pdf can be viewed here

Installation

You can install GeneticMediation from GitHub with:

# install.packages("devtools")
devtools::install_github("tydarnell/GeneticMediation")

Prerequisites

####################################################################################
#   
#   Software:--------------------------------------------------------
#
#     R version >= 3.6.1
#     devtools (to install GeneticMediation package from github)
#     Rstudio  (highly recommended)
#
#   Data:------------------------------------------------------------
#
#     ROSMAP Study:**************************************************
#       ReadCounts.csv   
#       H3K9acDomains.csv 
#
#     UNC Wu Lab:****************************************************
#       snps.txt
#       JulyselGeneBySNP.1030.RData
#       mediator_chr#_new.RData (each chr has a separate RData file)
#
####################################################################################

Data Access

Setup

1) Create an Rproject in Rstudio

2) Install and load GeneticMediation from GitHub with:

# devtools::install_github("tydarnell/GeneticMediation")
library(GeneticMediation)

3) Create subdirectories of your Rproject directory: data, data/mediator, results with:

GeneticMediation::setup_folders()

4) Put all data except for the mediator_chr#_new.RData files in the data folder

5) Put the mediator_chr#_new.RData files in the mediator folder

6) Check that data files are in the data folder with:

GeneticMediation::check_data()