Prior to TWAS

Functions for file formatting and eQTL analysis

convertToDosage()

Train and predict gene's predictive model with mediators

eQTL_MOSTWAS()

LD prune a genotype matrix

mergeFinalModels()

Output final MOSTWAS models

MOSTWAS modeling

Main wrapper functions for MOSTWAS expression models

trainLocalModel()

Train a local-only model for a phenotype

MeTWAS()

Train and predict gene's predictive model with mediators using MeTWAS

DePMA()

Train and predict gene's predictive model with mediators using DePMA

Association testing

Functions for TWAS association testing

burdenTest()

Compute weighted burden test

addedLastTest()

Compute weighted burden test

Simulation framework

Functions for running simulation analysis

regress()

Generate summary statistics for genotype-trait association

simBeta()

Simulate eQTL effect sizes

simEQTL()

Simulate eQTL reference panel

simGeno()

Simulate genotypes from reference data

simGWAS()

Simulate eQTL reference panel

simTrait()

Simulate trait from latent genetic values

Miscellaneous

Functions used internally in MOSTWAS

adjR2()

Compute McNemar's adjusted R2

amplifyTrans()

Write out mediator-based trans-eSNP effects

computeTME()

Compute total mediation effect

CVFitMediator()

Fit a single split in cross-validation for a given biomarker

estimateHeritability()

Estimate germline heritability of a biomarker

gatherMediators()

Extract mediating biomarkers for a given gene

getCisGenotypes()

Gather the cis-genotypes for a given biomarker

LDprune()

LD prune a genotype matrix

permuteTME()

Perform permutation test for the total mediation effect

RepParallel()

Parallel implementation of replicate()

sobelTest()

Compute total mediation effect

testTME()

Run TME tests through a data.frame of mediators

trainMediator()

Train and predict mediator predictive model

trainSNPPheno()

Train a local-only model for a phenotype

trainLocalModel()

Train a local-only model for a phenotype

trainDeP()

Train and predict gene's predictive model with mediators using DePMA

trainExpression()

Train and predict gene's predictive model with mediators using MeTWAS