Skip to content

Commit 15a0b24

Browse files
Merge pull request #108 from khersameesh24/dev
Merge baysor preview html in multiqc report
2 parents bc2cc6d + df5c503 commit 15a0b24

File tree

69 files changed

+1306
-625
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+1306
-625
lines changed

.github/workflows/nf-test.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
env:
5151
NFT_VER: ${{ env.NFT_VER }}
5252
with:
53-
max_shards: 7
53+
max_shards: 12
5454

5555
- name: debug
5656
run: |
@@ -64,6 +64,7 @@ jobs:
6464
runs-on: # use self-hosted runners
6565
- runs-on=${{ github.run_id }}-nf-test
6666
- runner=4cpu-linux-x64
67+
- disk=large
6768
strategy:
6869
fail-fast: false
6970
matrix:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ testing*
99
null/
1010
.nf-test/
1111
.nf-test.log
12+
.nf-test-*

assets/samplesheet.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
sample,bundle,image
2-
Xenium_Prime_Mouse_Ileum_tiny_outs,https://raw.githubusercontent.com/nf-core/test-datasets/spatialxe/Xenium_Prime_Mouse_Ileum_tiny_outs.tar.gz,
2+
test_run,https://raw.githubusercontent.com/nf-core/test-datasets/spatialxe/xenium_bundle.tar.gz

conf/modules.config

Lines changed: 127 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -18,138 +18,232 @@ process {
1818
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
1919
]
2020

21+
// ---------------------------- multiqc ---------------------------------------------------
22+
2123
withName: MULTIQC {
2224
ext.args = { params.multiqc_title ? "--title \"${params.multiqc_title}\"" : '' }
2325
publishDir = [
24-
path: { "${params.outdir}/multiqc" },
26+
path: { "${params.outdir}/${params.mode}/multiqc" },
2527
mode: params.publish_dir_mode,
2628
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
2729
]
2830
}
2931

30-
withName: XENIUMRANGER_RESEGMENT {
32+
withName: MULTIQC_PRE_XR_RUN {
33+
ext.args = { params.multiqc_title ? "--title \"${params.multiqc_title}\"" : "MultiQC Pre Xeniumranger import-segmentation Run" }
3134
publishDir = [
32-
path: "${params.outdir}/xeniumranger/resegment",
35+
path: { "${params.outdir}/${params.mode}/multiqc/raw_bundle" },
3336
mode: params.publish_dir_mode,
37+
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
3438
]
3539
}
3640

37-
withName: XENIUMRANGER_IMPORT_SEGMENTATION {
41+
withName: MULTIQC_POST_XR_RUN {
42+
ext.args = { params.multiqc_title ? "--title \"${params.multiqc_title}\"" : "MultiQC Post Xeniumranger import-segmentation Run" }
3843
publishDir = [
39-
path: "${params.outdir}/xeniumranger/import_segementation",
44+
path: { "${params.outdir}/${params.mode}/multiqc/redefined_bundle" },
4045
mode: params.publish_dir_mode,
46+
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
4147
]
4248
}
4349

44-
withName: PROSEG {
50+
51+
// ---------------------------- xeniumranger ---------------------------------------------------
52+
53+
withName: XENIUMRANGER_RELABEL {
4554
publishDir = [
46-
path: "${params.outdir}/proseg/preset",
55+
path: "${params.outdir}/${params.mode}/xeniumranger/relabel",
4756
mode: params.publish_dir_mode,
4857
]
4958
}
5059

51-
withName: PROSEG2BAYSOR {
60+
withName: XENIUMRANGER_RESEGMENT {
5261
publishDir = [
53-
path: "${params.outdir}/proseg/proseg2baysor",
62+
path: "${params.outdir}/${params.mode}/xeniumranger/resegment",
5463
mode: params.publish_dir_mode,
5564
]
5665
}
5766

58-
withName: FICTURE_PREPROCESS {
67+
withName: XENIUMRANGER_IMPORT_SEGMENTATION {
68+
publishDir = [
69+
path: "${params.outdir}/${params.mode}/xeniumranger/import_segementation",
70+
mode: params.publish_dir_mode,
71+
]
72+
}
73+
74+
// ---------------------------- proseg ---------------------------------------------------
75+
76+
withName: PROSEG {
5977
publishDir = [
60-
path: "${params.outdir}/ficture/preprocess",
78+
path: "${params.outdir}/${params.mode}/proseg/preset",
6179
mode: params.publish_dir_mode,
6280
]
6381
}
6482

83+
withName: PROSEG2BAYSOR {
84+
publishDir = [
85+
path: "${params.outdir}/${params.mode}/proseg/proseg2baysor",
86+
mode: params.publish_dir_mode,
87+
]
88+
}
89+
90+
// ---------------------------- baysor ---------------------------------------------------
91+
6592
withName: BAYSOR_RUN {
6693
publishDir = [
67-
path: { "${params.outdir}/baysor/run" },
94+
path: { "${params.outdir}/${params.mode}/baysor/run" },
6895
mode: params.publish_dir_mode,
6996
]
7097
}
7198

7299
withName: BAYSOR_SEGFREE {
73100
publishDir = [
74-
path: { "${params.outdir}/baysor/segfree" },
101+
path: { "${params.outdir}/${params.mode}/baysor/segfree" },
75102
mode: params.publish_dir_mode,
76103
]
77104
}
78105

79106
withName: BAYSOR_CREATE_DATASET {
80107
publishDir = [
81-
path: { "${params.outdir}/baysor/create_dataset" },
108+
path: { "${params.outdir}/${params.mode}/baysor/create_dataset" },
82109
mode: params.publish_dir_mode,
83110
]
84111
}
85112

86-
withName: BAYSOR_PREVIEW {
113+
withName: BAYSOR_PREPROCESS_TRANSCRIPTS {
87114
publishDir = [
88-
path: { "${params.outdir}/baysor/preview" },
115+
path: { "${params.outdir}/${params.mode}/baysor/preprocess" },
89116
mode: params.publish_dir_mode,
90117
]
91118
}
92119

93-
withName: RESOLIFT {
120+
withName: BAYSOR_PREVIEW {
94121
publishDir = [
95-
path: { "${params.outdir}/resolift/" },
122+
path: { "${params.outdir}/${params.mode}/baysor/preview" },
96123
mode: params.publish_dir_mode,
97124
]
98125
}
99126

127+
// ---------------------------- segger ---------------------------------------------------
128+
100129
withName: SEGGER_CREATE_DATASET {
101130
publishDir = [
102-
path: { "${params.outdir}/segger/create_dataset" },
131+
path: { "${params.outdir}/${params.mode}/segger/create_dataset" },
103132
mode: params.publish_dir_mode,
104133
]
105134
}
106135

107136
withName: SEGGER_TRAIN {
108137
publishDir = [
109-
path: { "${params.outdir}/segger/train" },
138+
path: { "${params.outdir}/${params.mode}/segger/train" },
110139
mode: params.publish_dir_mode,
111140
]
112141
ext.args = { "--init_emb 8 --hidden_channels 32 --num_tx_tokens 500 --out_channels 8 --heads 2 --num_mid_layers 2 --strategy auto --precision 16-mixed" }
113142
}
114143

115144
withName: SEGGER_PREDICT {
116145
publishDir = [
117-
path: { "${params.outdir}/segger/predict" },
146+
path: { "${params.outdir}/${params.mode}/segger/predict" },
147+
mode: params.publish_dir_mode,
148+
]
149+
}
150+
151+
// ---------------------------- ficture ------------------------------------------
152+
153+
withName: FICTURE_PREPROCESS {
154+
publishDir = [
155+
path: "${params.outdir}/${params.mode}/ficture/preprocess",
156+
mode: params.publish_dir_mode,
157+
]
158+
}
159+
160+
// ---------------------------- utility modules -----------------------------------
161+
162+
163+
withName: UNTAR {
164+
publishDir = [
165+
path: { "${params.outdir}/${params.mode}/untar/" },
166+
mode: params.publish_dir_mode,
167+
]
168+
}
169+
170+
withName: RESOLIFT {
171+
publishDir = [
172+
path: { "${params.outdir}/${params.mode}/resolift/" },
118173
mode: params.publish_dir_mode,
119174
]
120175
}
121176

122177
withName: PARQUET_TO_CSV {
123178
publishDir = [
124-
path: { "${params.outdir}/spatialconverter/parquet_to_csv" },
179+
path: { "${params.outdir}/${params.mode}/utility/spatialconverter/parquet_to_csv" },
180+
mode: params.publish_dir_mode,
181+
]
182+
}
183+
184+
withName: CLEAN_PREVIEW_HTML {
185+
publishDir = [
186+
path: { "${params.outdir}/${params.mode}/utility/clean_html/" },
125187
mode: params.publish_dir_mode,
126188
]
127189
}
128190

191+
withName: GET_TRANSCRIPTS_COORDINATES {
192+
publishDir = [
193+
path: { "${params.outdir}/${params.mode}/utility/get_coordinates/" },
194+
mode: params.publish_dir_mode,
195+
]
196+
}
197+
198+
withName: RESIZE_TIF {
199+
publishDir = [
200+
path: { "${params.outdir}/${params.mode}/utility/resize_tif/" },
201+
mode: params.publish_dir_mode,
202+
]
203+
}
204+
205+
withName: SEGGER2XR {
206+
publishDir = [
207+
path: { "${params.outdir}/${params.mode}/utility/segger2xr/" },
208+
mode: params.publish_dir_mode,
209+
]
210+
}
211+
212+
withName: SPLIT_TRANSCRIPTS {
213+
publishDir = [
214+
path: { "${params.outdir}/${params.mode}/utility/split_transcripts/" },
215+
mode: params.publish_dir_mode,
216+
]
217+
}
218+
219+
// ---------------------------- spatialdata --------------------------------------
220+
129221
withName: SPATIALDATA_WRITE {
130222
publishDir = [
131-
path: { "${params.outdir}/spatialdata/write" },
223+
path: { "${params.outdir}/${params.mode}/spatialdata/write" },
132224
mode: params.publish_dir_mode,
133225
]
134226
}
135227

136228
withName: SPATIALDATA_MERGE {
137229
publishDir = [
138-
path: { "${params.outdir}/spatialdata/merge" },
230+
path: { "${params.outdir}/${params.mode}/spatialdata/merge" },
139231
mode: params.publish_dir_mode,
140232
]
141233
}
142234

143235
withName: SPATIALDATA_META {
144236
publishDir = [
145-
path: { "${params.outdir}/spatialdata/meta" },
237+
path: { "${params.outdir}/${params.mode}/spatialdata/meta" },
146238
mode: params.publish_dir_mode,
147239
]
148240
}
149241

242+
// ---------------------------- cellpose -----------------------------------------
243+
150244
withName: CELLPOSE {
151245
publishDir = [
152-
path: { "${params.outdir}/cellpose" },
246+
path: { "${params.outdir}/${params.mode}/cellpose" },
153247
mode: params.publish_dir_mode,
154248
]
155249
ext.args = { "--diameter 9 --channel_axis 0 --save_flows" }
@@ -158,7 +252,7 @@ process {
158252
// with new version of cellpose you can do --output_name cell_masks
159253
withName: CELLPOSE_CELLS {
160254
publishDir = [
161-
path: { "${params.outdir}/cellpose_cells" },
255+
path: { "${params.outdir}/${params.mode}/cellpose_cells" },
162256
mode: params.publish_dir_mode,
163257
]
164258
ext.args = { "--diameter 9 --channel_axis 0 --save_flows" }
@@ -167,29 +261,31 @@ process {
167261
// with new version of cellpose you can do --output_name nucleus_masks
168262
withName: CELLPOSE_NUCLEI {
169263
publishDir = [
170-
path: { "${params.outdir}/cellpose_nuclei" },
264+
path: { "${params.outdir}/${params.mode}/cellpose_nuclei" },
171265
mode: params.publish_dir_mode,
172266
]
173267
ext.args = { "--diameter 9 --channel_axis 0 --save_flows" }
174268
}
175269

270+
// ---------------------------- opt -----------------------------------------
271+
176272
withName: OPT_FLIP {
177273
publishDir = [
178-
path: { "${params.outdir}/opt/flip" },
274+
path: { "${params.outdir}/${params.mode}/opt/flip" },
179275
mode: params.publish_dir_mode,
180276
]
181277
}
182278

183279
withName: OPT_TRACK {
184280
publishDir = [
185-
path: { "${params.outdir}/opt/track" },
281+
path: { "${params.outdir}/${params.mode}/opt/track" },
186282
mode: params.publish_dir_mode,
187283
]
188284
}
189285

190286
withName: OPT_STAT {
191287
publishDir = [
192-
path: { "${params.outdir}/opt/stat" },
288+
path: { "${params.outdir}/${params.mode}/opt/stat" },
193289
mode: params.publish_dir_mode,
194290
]
195291
}

conf/test.config

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,14 @@ process {
1414

1515
resourceLimits = [
1616
cpus: 4,
17-
memory: '15.GB',
17+
memory: '8.GB',
1818
time: '2.h',
1919
]
2020

21+
withName: UNTAR {
22+
ext.prefix = "test_run"
23+
}
24+
2125
}
2226

2327
params {

conf/test_coordinate_mode.config

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
Nextflow config file for running minimal tests
4+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5+
Defines input files and everything required to run a fast and simple pipeline test.
6+
7+
Use as follows:
8+
nextflow run nf-core/spatialxe -profile test,<docker/singularity> --mode <MODE> --outdir <OUTDIR>
9+
10+
----------------------------------------------------------------------------------------
11+
*/
12+
13+
process {
14+
15+
resourceLimits = [
16+
cpus: 4,
17+
memory: '8.GB',
18+
time: '2.h',
19+
]
20+
21+
}
22+
23+
params {
24+
config_profile_name = 'Test profile'
25+
config_profile_description = 'Minimal test dataset to check pipeline function in the coordinate mode'
26+
27+
// Input data
28+
input = "${projectDir}/assets/samplesheet.csv"
29+
outdir = 'results'
30+
mode = 'coordinate'
31+
}

0 commit comments

Comments
 (0)