From 900606fa49d134e74ba9c626ca9d11b29d32d3df Mon Sep 17 00:00:00 2001 From: Felipe Marques de Almeida Date: Tue, 30 Apr 2024 10:28:34 +0000 Subject: [PATCH] re-added celranger-arc backwards compatibility --- subworkflows/local/mtx_conversion.nf | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/subworkflows/local/mtx_conversion.nf b/subworkflows/local/mtx_conversion.nf index 55541f18..98e49a2e 100644 --- a/subworkflows/local/mtx_conversion.nf +++ b/subworkflows/local/mtx_conversion.nf @@ -14,6 +14,16 @@ workflow MTX_CONVERSION { main: ch_versions = Channel.empty() + // Cellranger module output contains too many files which cause path collisions, we filter to the ones we need. + // Keeping backwards compatibility with cellranger-arc. + // TODO: Adapt cellranger-arc subworkflow like cellranger to remove this snippet here. + if (params.aligner in [ 'cellrangerarc' ]) { + mtx_matrices = mtx_matrices.map { meta, mtx_files -> + [ meta, mtx_files.findAll { it.toString().contains("filtered_feature_bc_matrix") } ] + } + .filter { meta, mtx_files -> mtx_files } // Remove any that are missing the relevant files + } + // // Convert matrix to h5ad //