-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSnakefile
86 lines (80 loc) · 4.59 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# snakemake --cluster "oarsub --project epimed -l /nodes=1/core=1,walltime=00:10:00" --latency-wait 60 --cores 1 --jobs 50
DATA_DNAm=['BrCL1','PaCL1','PaCL2','LuCL']
DATA_RNA=['BrCL1','BrCL2','PaCL1','PaCL2','BlCL']
METHOD_DNAm_SUP=["rlr", "CIBERSORT", "epidishCP", "InstaPrism", "nnls"]
METHOD_DNAm_UNSUP=["RefFreeEWAS", "ICA", "EDec", "NMF", "debCAM", "MeDeCom"]
METHOD_RNA_SUP=["DeconRNASeq", "CIBERSORT", "elasticnet", "rlr", "WISP", "fardeep", "fardeepsto", "InstaPrism", "nnls", "ols", "svr"]
METHOD_RNA_UNSUP=["ICA", "NMF", "PREDE", "debCAM", "CDSeq"]
FS=["none","toast","hvf"]
REPLICATE=['01','02','03','04','05','06','07','08','09','10']
DATE='240101'
rule all:
input:
expand("results/prediction/dnam/sup/"+DATE+"_{data}_Apred_{fs}_{method}_sim{sim}.rds", data=DATA_DNAm, method=METHOD_DNAm_SUP, sim=REPLICATE, fs=FS),
expand("results/prediction/dnam/unsup/"+DATE+"_{data}_Apred_{fs}_{method}_sim{sim}.rds", data=DATA_DNAm, method=METHOD_DNAm_UNSUP, sim=REPLICATE, fs=FS),
expand("results/prediction/rna/sup/"+DATE+"_{data}_Apred_{fs}_{method}_sim{sim}.rds", data=DATA_RNA, method=METHOD_RNA_SUP, sim=REPLICATE, fs=FS),
expand("results/prediction/rna/unsup/"+DATE+"_{data}_Apred_{fs}_{method}_sim{sim}.rds", data=DATA_RNA, method=METHOD_RNA_UNSUP, sim=REPLICATE, fs=FS)
rule deconv_dnam_sup:
input:
script = ancient('scripts/supervised_DNAm.R')
params:
data = '{data}',
method = '{method}',
fs = '{fs}',
sim = '{sim}',
date = '{date}'
output:
file_res = "results/prediction/dnam/sup/{date}_{data}_Apred_{fs}_{method}_sim{sim}.rds",
file_time = "results/timing/dnam/sup/{date}_{data}_timing_{fs}_{method}_sim{sim}.rds"
threads: 32
log: stdout="logs/dnam_sup_{date}_{data}_{method}_{sim}_{fs}.log", stderr="logs/dnam_sup_{date}_{data}_{method}_{sim}_{fs}.log"
shell:
"apptainer exec --bind /YOUR/PROJECT/ROOT:/YOUR/PROJECT/ROOT container2.sif Rscript {input.script} {params.data} 'dnam' {params.method} 'sup' {params.sim} {params.date} {params.fs} {output.file_res} {output.file_time} > {log.stdout} 2> {log.stderr}"
rule deconv_dnam_unsup:
input:
script = ancient('scripts/unsupervised_DNAm.R')
params:
data = '{data}',
method = '{method}',
fs = '{fs}',
sim = '{sim}',
date = '{date}'
output:
file_res = "results/prediction/dnam/unsup/{date}_{data}_Apred_{fs}_{method}_sim{sim}.rds",
file_time = "results/timing/dnam/unsup/{date}_{data}_timing_{fs}_{method}_sim{sim}.rds"
threads: 32
log: stdout="logs/dnam_unsup_{date}_{data}_{method}_{sim}_{fs}.log", stderr="logs/dnam_unsup_{date}_{data}_{method}_{sim}_{fs}.log"
shell:
"apptainer exec --bind /YOUR/PROJECT/ROOT:/YOUR/PROJECT/ROOT container2.sif Rscript {input.script} {params.data} 'dnam' {params.method} 'unsup' {params.sim} {params.date} {params.fs} {output.file_res} {output.file_time} > {log.stdout} 2> {log.stderr}"
rule deconv_rna_sup:
input:
script = ancient('scripts/supervised_RNA.R')
params:
data = '{data}',
method = '{method}',
fs = '{fs}',
sim = '{sim}',
date = '{date}'
output:
file_res = "results/prediction/rna/sup/{date}_{data}_Apred_{fs}_{method}_sim{sim}.rds",
file_time = "results/timing/rna/sup/{date}_{data}_timing_{fs}_{method}_sim{sim}.rds"
threads: 32
log: stdout="logs/rna_sup_{date}_{data}_{method}_{sim}_{fs}.log", stderr="logs/rna_sup_{date}_{data}_{method}_{sim}_{fs}.log"
shell:
"apptainer exec --bind /YOUR/PROJECT/ROOT:/YOUR/PROJECT/ROOT container2.sif Rscript {input.script} {params.data} 'rna' {params.method} 'sup' {params.sim} {params.date} {params.fs} {output.file_res} {output.file_time} > {log.stdout} 2> {log.stderr}"
rule deconv_rna_unsup:
input:
script = ancient('scripts/unsupervised_RNA.R')
params:
data = '{data}',
method = '{method}',
fs = '{fs}',
sim = '{sim}',
date = '{date}'
output:
file_res = "results/prediction/rna/unsup/{date}_{data}_Apred_{fs}_{method}_sim{sim}.rds",
file_time = "results/timing/rna/unsup/{date}_{data}_timing_{fs}_{method}_sim{sim}.rds"
threads: 32
log: stdout="logs/rna_unsup_{date}_{data}_{method}_{sim}_{fs}.log", stderr="logs/rna_unsup_{date}_{data}_{method}_{sim}_{fs}.log"
shell:
"apptainer exec --bind /YOUR/PROJECT/ROOT:/YOUR/PROJECT/ROOT container2.sif Rscript {input.script} {params.data} 'rna' {params.method} 'unsup' {params.sim} {params.date} {params.fs} {output.file_res} {output.file_time} > {log.stdout} 2> {log.stderr}"