forked from nf-core/spatialvi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.nf
More file actions
158 lines (147 loc) · 5.36 KB
/
main.nf
File metadata and controls
158 lines (147 loc) · 5.36 KB
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
#!/usr/bin/env nextflow
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nf-core/spatialvi
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Github : https://github.com/nf-core/spatialvi
Website: https://nf-co.re/spatialvi
Slack : https://nfcore.slack.com/channels/spatialvi
----------------------------------------------------------------------------------------
*/
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IMPORT FUNCTIONS / MODULES / SUBWORKFLOWS / WORKFLOWS
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
include { SPATIALVI } from './workflows/spatialvi'
include { PIPELINE_INITIALISATION } from './subworkflows/local/utils_nfcore_spatialvi_pipeline'
include { PIPELINE_COMPLETION } from './subworkflows/local/utils_nfcore_spatialvi_pipeline'
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NAMED WORKFLOWS FOR PIPELINE
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
//
// WORKFLOW: Run main analysis pipeline depending on type of input
//
workflow NFCORE_SPATIALVI {
take:
samplesheet // file : samplesheet read in from --input
spaceranger_reference // dir : /path/to/reference
spaceranger_probeset // file : /path/to/csv
hd_bin_size // integer: Bin size for Visium HD
qc_min_counts // integer: Minimum UMIs per spot
qc_min_genes // integer: Minimum genes per spot
qc_min_spots // integer: Minimum spots per gene
qc_mito_threshold // float : Maximum mito. content per spot
qc_ribo_threshold // float : Minimum ribo. content per spot
qc_hb_threshold // float : Maximum haem. content per spot
cluster_n_hvgs // integer: Number of HVGs to use
cluster_resolution // float : Spot clustering resolution
svg_autocorr_method // string : Autocorrelation method
n_top_svgs // integer: Number of variable genes to plot
merge_sdata // boolean: Whether to merge sdata or not
integrate_sdata // boolean: Whether to integrate sdata or not
integration_cluster_resolution // float : Integration cluster resolution
integration_n_hvgs // integer: Number of HVGs to integrate with
multiqc_config // file : /path/to/multiqc/config
multiqc_logo // file : /path/to/multiqc/logo
multiqc_methods_description // file : /path/to/multiqc/description
outdir // dir : /path/to/output/directory
main:
//
// WORKFLOW: Run pipeline
//
SPATIALVI (
samplesheet,
spaceranger_reference,
spaceranger_probeset,
hd_bin_size,
qc_min_counts,
qc_min_genes,
qc_min_spots,
qc_mito_threshold,
qc_ribo_threshold,
qc_hb_threshold,
cluster_n_hvgs,
cluster_resolution,
svg_autocorr_method,
n_top_svgs,
merge_sdata,
integrate_sdata,
integration_cluster_resolution,
integration_n_hvgs,
multiqc_config,
multiqc_logo,
multiqc_methods_description,
outdir,
)
emit:
multiqc_report = SPATIALVI.out.multiqc_report // channel: /path/to/multiqc_report.html
}
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
RUN MAIN WORKFLOW
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
workflow {
main:
//
// SUBWORKFLOW: Run initialisation tasks
//
PIPELINE_INITIALISATION (
params.version,
params.validate_params,
params.monochrome_logs,
args,
params.outdir,
params.input,
params.help,
params.help_full,
params.show_hidden
)
//
// WORKFLOW: Run main workflow
//
NFCORE_SPATIALVI (
params.input,
params.spaceranger_reference,
params.spaceranger_probeset,
params.hd_bin_size,
params.qc_min_counts,
params.qc_min_genes,
params.qc_min_spots,
params.qc_mito_threshold,
params.qc_ribo_threshold,
params.qc_hb_threshold,
params.cluster_n_hvgs,
params.cluster_resolution,
params.svg_autocorr_method,
params.n_top_svgs,
params.merge_sdata,
params.integrate_sdata,
params.integration_cluster_resolution,
params.integration_n_hvgs,
params.multiqc_config,
params.multiqc_logo,
params.multiqc_methods_description,
params.outdir,
)
//
// SUBWORKFLOW: Run completion tasks
//
PIPELINE_COMPLETION (
params.email,
params.email_on_fail,
params.plaintext_email,
params.outdir,
params.monochrome_logs,
params.hook_url,
NFCORE_SPATIALVI.out.multiqc_report
)
}
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
THE END
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/