Skip to content

Commit 0992eca

Browse files
committed
qc mode and changes to nf-test.yml for larger disk space
1 parent cb19c53 commit 0992eca

File tree

3 files changed

+29
-6
lines changed

3 files changed

+29
-6
lines changed

.github/workflows/nf-test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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:

subworkflows/local/utils_nfcore_spatialxe_pipeline/main.nf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,11 +236,13 @@ def validateInputParameters() {
236236
}
237237

238238
// check if required arguments are provided for off-target probe tracking
239-
if (params.offtarget_probe_tracking) {
239+
if (!params.mode && params.offtarget_probe_tracking) {
240240
if(!params.probes_fasta || !params.reference_annotations || !params.gene_synonyms) {
241241
log.error("❌ Error: Missing required param(s) for off-target-proebe detection.")
242242
exit(1)
243243
}
244+
log.error("❌ Error: Use --mode qc and --offtraget_probe_tracking to run off-target probe tracking.")
245+
exit(1)
244246
}
245247
}
246248

workflows/spatialxe.nf

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ workflow SPATIALXE {
7070
ch_features = Channel.empty()
7171
ch_raw_bundle = Channel.empty()
7272
ch_gene_panel = Channel.empty()
73+
ch_qc_reports = Channel.empty()
7374
ch_bundle_path = Channel.empty()
7475
ch_preview_html = Channel.empty()
7576
ch_exp_metadata = Channel.empty()
@@ -438,10 +439,11 @@ workflow SPATIALXE {
438439
*/
439440

440441
// check to run the qc layer
441-
if (params.run_qc) {
442+
if (params.mode == 'qc' || params.run_qc) {
442443

443444
if (params.offtarget_probe_tracking) {
444445

446+
// run off-target probe tracking
445447
OPT_FLIP_TRACK_STAT(
446448
ch_panel_probes_fasta,
447449
ch_reference_annotations,
@@ -582,11 +584,29 @@ workflow SPATIALXE {
582584
}
583585
ch_multiqc_files = ch_multiqc_files.mix(ch_just_bundle_path.flatten())
584586

585-
// get the preview html file if preview mode is run
586-
ch_just_preview_html = ch_preview_html.map { _meta, preview_html ->
587-
return [preview_html]
587+
588+
// get the qc htmls if qc mode is run
589+
if (params.mode == 'qc' || params.run_qc) {
590+
591+
// TODO collect all qc outs in a channel to be passed to multiqc
592+
ch_just_qc_htmls = ch_qc_reports.map { _meta, qc_reports ->
593+
return [qc_reports]
594+
}
595+
ch_multiqc_files = ch_multiqc_files.mix(ch_just_qc_htmls.flatten())
596+
588597
}
589-
ch_multiqc_files = ch_multiqc_files.mix(ch_just_preview_html.flatten())
598+
599+
600+
// get the preview html if preview mode is run
601+
if (params.mode == 'preview') {
602+
603+
ch_just_preview_html = ch_preview_html.map { _meta, preview_html ->
604+
return [preview_html]
605+
}
606+
ch_multiqc_files = ch_multiqc_files.mix(ch_just_preview_html.flatten())
607+
608+
}
609+
590610

591611
MULTIQC (
592612
ch_multiqc_files.collect(),

0 commit comments

Comments
 (0)