/TWAS_HUB

web interface for reporting transcriptome-wide association study results

Primary LanguageR

TWAS HUB

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.

Parameter files

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, the OUTPUT column must to point to the merged results from all chromosomes for that trait (see below).

Workflow:

  • mkdir genes traits tmp
  • Submit TWAS.sh jobs for each trait x chromosome in parallel (see example run_TWAS.sh)
  • Run MERGE.sh to combine all files and generate info files
  • Submit REPORT.sh for each trait (see example run_REPORT.sh)
  • Run Rscript REPORT_GENES.R to scan through all traits and build individual gene reports (this takes a few hours)
  • Run Rscript REPORT_INDEX.R to generate all index files (fast)
  • Copy traits/, genes/, and all *.md files to the jekyll/ directory and then execute jekyll build to get the formatted web-site (or upload the directory to github-pages). See jekyll docs for more info.