From c9712c8c2d832af43580d8a2c57b1a51771c9c1f Mon Sep 17 00:00:00 2001 From: Nico Trummer Date: Wed, 13 Nov 2024 17:16:39 +0100 Subject: [PATCH] Fix zero falsy bug --- modules/local/scanpy/filter/main.nf | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/local/scanpy/filter/main.nf b/modules/local/scanpy/filter/main.nf index e916928..66ef398 100644 --- a/modules/local/scanpy/filter/main.nf +++ b/modules/local/scanpy/filter/main.nf @@ -18,11 +18,11 @@ process SCANPY_FILTER { task.ext.when == null || task.ext.when script: - min_genes = meta.min_genes ?: 1 - min_cells = meta.min_cells ?: 1 - min_counts_gene = meta.min_counts_gene ?: 1 - min_counts_cell = meta.min_counts_cell ?: 1 - max_mito_percentage = meta.max_mito_percentage ?: 100 + min_genes = meta.containsKey("min_genes") ? meta.min_genes : 1 + min_cells = meta.containsKey("min_cells") ? meta.min_cells : 1 + min_counts_gene = meta.containsKey("min_counts_gene") ? meta.min_counts_gene : 1 + min_counts_cell = meta.containsKey("min_counts_cell") ? meta.min_counts_cell : 1 + max_mito_percentage = meta.containsKey("max_mito_percentage") ? meta.max_mito_percentage : 100 prefix = task.ext.prefix ?: "${meta.id}" template 'filter.py' }