-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSnakefile_rna_fullanalysis
49 lines (42 loc) · 1.64 KB
/
Snakefile_rna_fullanalysis
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
#shell.executable("/bin/bash")
#shell.prefix("source /etc/profile.d/modules.sh; ")
from snakemake.utils import R
import glob
import os.path
import os
import itertools
import sys
## aggregate is set to "True" in the step below
include: "rules/singlecell_import.smk"
include: "rules/singlecell_rules_common.smk"
## if there is only one sample, there is no need to run cellrange aggr
aggregate = getattr(config, "aggregate", True)
aggr_output4ruleall = ["aggregate.complete"] if aggregate else []
## variable `samples` is created in Snakefile_singlecell_import
if len(samples) == 1: ## only one sample
aggregate = False
aggr_output4ruleall = []
include: "rules/singlecell_rna_import.smk"
## Full analysis part
include: "rules/singlecell_rna_seurat_proc.smk"
include: "rules/singlecell_rna_singleR.smk"
include: "rules/singlecell_rna_report.smk"
copy_complete = 'copy.complete'
if external == True:
wreport_result = []
xreport_result = []
copy_complete = []
rule all:
input:
expand(os.path.join(analysis, "{sample}/singleR/seur_10x_cluster_singler.rds"), sample=samples),
expand(os.path.join(analysis, "{sample}/seurat/seur_10x_cluster_object.rds"), sample=samples),
expand(os.path.join(analysis, "{sample}_sc_report.html"), sample = samples),
expand("run_{sample}_10x_cellranger_count.err", sample=samples),
"finalreport/metric_summary.xlsx",
expand("finalreport/summaries/{sample}_web_summary.html", sample=samples),
aggr_output4ruleall,
wreport_result,
xreport_result,
"QC/" + project_name + "_multiqc.html",
copy_complete,
rule_all_append