-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSnakefile
46 lines (39 loc) · 1.82 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
configfile: 'config/config.yml'
samples = config['samples']
output = 'output/' #+ config['version'] + '/'
rule all:
input:
expand(output + 'infercnv/{sample}/infercnv.png', sample = samples),
expand(output + 'cna_heatmaps/{sample}_infercnv.png', sample = samples)
rule run_infer_cnv:
input:
sce = config['input_rds'],
genelist = "resources/hg38_gencode_v27.txt"
params:
out_dir = output + 'infercnv/{sample}/',
annotation_column = config['annotation_column'],
tumour_type = config['tumour_type'],
normal_type = config['normal_type'],
cutoff = config['cutoff'],
denoise = config['denoise'],
leiden_res = config['leiden_res'],
sample_column = config['sample_column'],
threads: 8
# log: out = "logs/{sample}_stdout.log",
# err = "logs/{sample}_stderr.err"
resources:
mem_mb = 150000
container:
"docker://trinityctat/infercnv"
output:
png = output + 'infercnv/{sample}/infercnv.png',
obj = output + 'infercnv/{sample}/20_HMM_pred.repr_intensitiesHMMi6.leiden.hmm_mode-subclusters.Pnorm_0.5.infercnv_obj'
shell:
'Rscript scripts/run_infercnv.R --sce {input.sce} --out_dir {params.out_dir} --genelist {input.genelist} --annotation_column {params.annotation_column} --tumour_type "{params.tumour_type}" --normal_type "{params.normal_type}" --cutoff {params.cutoff} --denoise {params.denoise} --threads {threads} --leiden_res {params.leiden_res} --sample {wildcards.sample} --sample_column {params.sample_column}'
rule move_figs_to_standalone_dir:
input:
output+ "infercnv/{sample}/infercnv.20_HMM_predHMMi6.leiden.hmm_mode-subclusters.Pnorm_0.5.repr_intensities.png",
output:
output + "cna_heatmaps/{sample}_infercnv.png"
shell:
'cp {input} {output}'