-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSnakefile
61 lines (51 loc) · 1.56 KB
/
Snakefile
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
59
60
61
### This workflow is for the detection of differentially methylated cpg islands
## vim: ft=python
import sys
import os
from snakemake.utils import R
shell.prefix("set -eo pipefail; ")
localrules: all
configfile:"config.yaml"
rule all:
input:
"data/inital_data.Rdata",
"minfi/minfi_data.Rdata",
"champ/champ_data.Rdata",
"overlap/overlap.Rdata"
rule read_in:
input:
"data/norBeta.txt",
"data/pheno.csv"
output:
"data/inital_data.Rdata"
threads:2
shell:
"""
Rscript -e "rmarkdown::render('R_code/data_read_in.Rmd', output_file='../data/data_read_in.html')" 2>log/data_read_in.err
"""
rule minfi:
input: "data/inital_data.Rdata"
output: "minfi/minfi_data.Rdata"
threads:2
params:
type = config["minfi_type"]
shell:
"""
Rscript -e "rmarkdown::render('R_code/{params.type}.Rmd', output_file='../minfi/{params.type}.html')" 2>log/minfi.err
"""
rule champ:
input: "minfi/minfi_data.Rdata","data/inital_data.Rdata"
output: "champ/champ_data.Rdata"
threads:2
shell:
"""
Rscript -e "rmarkdown::render('R_code/champ.Rmd', output_file='../champ/champ.html')" 2>log/champ.err
"""
rule overlap:
input: "minfi/minfi_data.Rdata","champ/champ_data.Rdata"
output: "overlap/overlap.Rdata"
threads:2
shell:
"""
Rscript -e "rmarkdown::render('R_code/check_overlap.Rmd', output_file='../overlap/check_overlap.html')" 2>log/check_overlap.err
"""