-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcoloc.smk
37 lines (32 loc) · 1.03 KB
/
coloc.smk
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
from os.path import join
import os
import numpy as np
import pandas as pd
import sys
"""
Run coloc on fetal + PsychENCODE QTLs
- fetal e/iso/sQTL, trimester e/iso/sQTL
- PEC e/isoQTL
"""
TEST_TABLE = pd.read_table("/u/project/gandalm/cindywen/ipsych_gwas/data/gwas_indexSNP.tsv")
rule all:
input:
expand(
"/u/project/gandalm/cindywen/ipsych_gwas/out/locus{locus}/coloc_{annot}.done",
annot=["eqtl", "isoqtl", "sqtl", "tri1_eqtl", "tri2_eqtl", "tri1_isoqtl", "tri2_isoqtl", "tri1_sqtl", "tri2_sqtl"],
locus=TEST_TABLE.locus.values,
),
rule coloc:
input:
"/u/project/gandalm/cindywen/ipsych_gwas/data/gwas_indexSNP.tsv",
output:
"/u/project/gandalm/cindywen/ipsych_gwas/out/locus{locus}/coloc_{annot}.done",
shell:
"""
. /u/local/Modules/default/init/modules.sh
module load R/4.1.0-BIO
Rscript scripts/coloc_fetal_pec.R \
--locus {wildcards.locus} \
--annot {wildcards.annot}
touch {output[0]}
"""