From 2491edf32d3d8050addb9b46173bc5f03c33cd7b Mon Sep 17 00:00:00 2001 From: Erik Fasterius Date: Tue, 17 Dec 2024 09:07:08 +0100 Subject: [PATCH] Add functionality for `--unknown-slide` option Add functionality to be able to use the `--unknown-slide` option of Space Ranger Count, specified using the `slide` column in the input samplesheet. --- modules/nf-core/spaceranger/count/main.nf | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/nf-core/spaceranger/count/main.nf b/modules/nf-core/spaceranger/count/main.nf index f33d82fcc7e..efbb1b9c734 100644 --- a/modules/nf-core/spaceranger/count/main.nf +++ b/modules/nf-core/spaceranger/count/main.nf @@ -31,17 +31,23 @@ process SPACERANGER_COUNT { def cytaimage = cytaimage ? "--cytaimage=\"${cytaimage}\"" : "" def darkimage = darkimage ? "--darkimage=\"${darkimage}\"" : "" def colorizedimage = colorizedimage ? "--colorizedimage=\"${colorizedimage}\"" : "" + def slide = meta.slide ? meta.slide : "" + def area = meta.area ? meta.area : "" + if (slide.matches("visium-(.*)") && area == "" && slidefile == "") { + slide_and_area = "--unknown-slide=\"${slide}\"" + } else { + slide_and_area = "--slide=\"${slide}\" --area=\"${area}\"" + } """ spaceranger count \\ --id="${prefix}" \\ --sample="${meta.id}" \\ --fastqs=. \\ - --slide="${meta.slide}" \\ - --area="${meta.area}" \\ --transcriptome="${reference}" \\ --localcores=${task.cpus} \\ --localmem=${task.memory.toGiga()} \\ $image $cytaimage $darkimage $colorizedimage \\ + $slide_and_area \\ $probeset \\ $alignment \\ $slidefile \\