Skip to content

Latest commit

 

History

History
103 lines (73 loc) · 2.58 KB

README.md

File metadata and controls

103 lines (73 loc) · 2.58 KB

Genetic Mediation

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)
  1. Create subdirectories of your Rproject directory: data, data/mediator, results with:
GeneticMediation::setup_folders()
  1. Put all data except for the mediator_chr#_new.RData files in the data folder

  2. Put the mediator_chr#_new.RData files in the mediator folder

  3. Check that data files are in the data folder with:

GeneticMediation::check_data()