-
Notifications
You must be signed in to change notification settings - Fork 11
/
fastqtl2mash.Rmd
59 lines (45 loc) · 2.09 KB
/
fastqtl2mash.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
---
title: "Converting FastQTL results to mash format"
author: "Sarah Urbut, Gao Wang, Peter Carbonetto and Matthew Stephens"
site: workflowr::wflow_site
output: workflowr::wflow_html
---
## Overview
We provide code to convert association statistics in
[FastQTL][fastqtl] format, or a format similar to FastQTL, to a format
that is more convenient for mash analysis. Here we give instructions
for using this code, and demonstrate how to convert a toy FastQTL data
set. This toy data set is included in the git repository.
If you find a bug in any of these steps, please post an
[issue][issues].
## Converting eQTL summary statistics to MASH format
Here we explain how the
[MatrixEQTLSumStats.Portable.Z.rds](data/MatrixEQTLSumStats.Portable.Z.rds)
data file was generated from the source data downloaded from the
[GTEx Portal](http://gtexportal.org). The source data are the SNP-gene
association statistics from release 6 of the GTEx Project
(`GTEx_Analysis_V6_all-snp-gene-associations.tar`).
Under the repo you will find `workflows/fastqtl_to_mash.ipynb` to
convert eQTL summary statistics (default to `fastqtl` format) to MASH
format. Computation is configured to run in parallel for eQTL results
from multiple studies. Example data-set can be found at
`data/eQTLDataDemo`. The workflow file is documented in itself, and
has a few options to customize the input and output.
To read what's available, run:
```bash
mash-docker sos run workflows/fastqtl_to_mash.ipynb export
```
and read the HTML files
`output/fastqtl_to_mash.lite.html` and
`output/fastqtl_to_mash.full.html`
To run the conversion:
```bash
mash-docker sos run workflows/fastqtl_to_mash.ipynb \
--data_list data/eQTLDataDemo/FastQTLSumStats.list \
--gene_list data/eQTLDataDemo/GTEx_genes.txt
```
In practice for GTEx data the conversion is computationally intensive
and is best done on a cluster environment with
[configurations to run the workflow across different nodes](https://vatlab.github.io/sos-docs/doc/documentation/Remote_Execution.html).
[issues]: https://github.com/stephenslab/gtexresults/issues
[fastqtl]: http://fastqtl.sourceforge.net