Code for running large-scale TWAS analyses and producing static Markdown reports. This repository contains scripts that compute TWAS statistics for many traits, merge and annotate them, produce reports, and generate an interactive web-site (see the jekyll directory). Note: for 324 traits, this analysis resulted in ~60,000 reports for a total of 2GB.
The REPORT_*.R scripts use as input the following parameter files:
panels.par: Statistics on the gene expression reference panels used. If you're running with our pre-computed FUSION weights you can use the provided file.all.models.par: Statistics on each of the predictive models, generated by the FUSION profiler script. If you're running with our pre-computed FUSION weights you can use the provided file.traits.par: Information on each of the traits/TWAS studies performed. Important, theOUTPUTcolumn must to point to the merged results from all chromosomes for that trait (see below).
mkdir genes traits tmp- Submit
TWAS.shjobs for each trait x chromosome in parallel (see examplerun_TWAS.sh) - Run
MERGE.shto combine all files and generate info files - Submit
REPORT.shfor each trait (see examplerun_REPORT.sh) - Run
Rscript REPORT_GENES.Rto scan through all traits and build individual gene reports (this takes a few hours) - Run
Rscript REPORT_INDEX.Rto generate all index files (fast) - Copy
traits/,genes/, and all*.mdfiles to thejekyll/directory and then executejekyll buildto get the formatted web-site (or upload the directory to github-pages). See jekyll docs for more info.