From 73cbad2edede1642d260b1203bde3041dcd97c08 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 23 Jun 2025 02:40:37 +0000 Subject: [PATCH 1/2] Sanitize restriction site tag to handle special characters --- modules/local/hicpro/get_restriction_fragments.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/local/hicpro/get_restriction_fragments.nf b/modules/local/hicpro/get_restriction_fragments.nf index 9d10014..f89d082 100644 --- a/modules/local/hicpro/get_restriction_fragments.nf +++ b/modules/local/hicpro/get_restriction_fragments.nf @@ -1,5 +1,5 @@ process GET_RESTRICTION_FRAGMENTS { - tag "$res_site" + tag "${res_site.replaceAll(/[^a-zA-Z0-9_-]/, '_')}" label 'process_low' conda "conda-forge::python=3.9 conda-forge::numpy=1.22.3" From 50ab2fd9c555e249af176901e5c5011b0c71ebdd Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 23 Jun 2025 02:49:43 +0000 Subject: [PATCH 2/2] Fix process tag formatting to handle special characters in filenames --- modules/local/hicpro/dnase_mapping_stats.nf | 2 +- modules/nf-core/bowtie2/build/main.nf | 2 +- modules/nf-core/bwa/index/main.nf | 2 +- modules/nf-core/cooler/makebins/main.nf | 2 +- modules/nf-core/custom/getchromsizes/main.nf | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/local/hicpro/dnase_mapping_stats.nf b/modules/local/hicpro/dnase_mapping_stats.nf index 8e85113..9abbe61 100644 --- a/modules/local/hicpro/dnase_mapping_stats.nf +++ b/modules/local/hicpro/dnase_mapping_stats.nf @@ -1,5 +1,5 @@ process MAPPING_STATS_DNASE { - tag "$sample = $bam" + tag "${(meta.id + '_' + bam.baseName).replaceAll(/[^a-zA-Z0-9_-]/, '_')}" label 'process_medium' conda "bioconda::samtools=1.15.1" diff --git a/modules/nf-core/bowtie2/build/main.nf b/modules/nf-core/bowtie2/build/main.nf index 9e2e0e5..5800758 100644 --- a/modules/nf-core/bowtie2/build/main.nf +++ b/modules/nf-core/bowtie2/build/main.nf @@ -1,5 +1,5 @@ process BOWTIE2_BUILD { - tag "$fasta" + tag "${fasta.baseName.replaceAll(/[^a-zA-Z0-9_-]/, '_')}" label 'process_high' conda "${moduleDir}/environment.yml" diff --git a/modules/nf-core/bwa/index/main.nf b/modules/nf-core/bwa/index/main.nf index 24b5a2e..d9912de 100644 --- a/modules/nf-core/bwa/index/main.nf +++ b/modules/nf-core/bwa/index/main.nf @@ -1,5 +1,5 @@ process BWA_INDEX { - tag "$fasta" + tag "${fasta.baseName.replaceAll(/[^a-zA-Z0-9_-]/, '_')}" label 'process_single' conda "${moduleDir}/environment.yml" diff --git a/modules/nf-core/cooler/makebins/main.nf b/modules/nf-core/cooler/makebins/main.nf index 8a41556..99adb57 100644 --- a/modules/nf-core/cooler/makebins/main.nf +++ b/modules/nf-core/cooler/makebins/main.nf @@ -1,5 +1,5 @@ process COOLER_MAKEBINS { - tag "${meta.id}}" + tag "${meta.id}" label 'process_low' conda "${moduleDir}/environment.yml" diff --git a/modules/nf-core/custom/getchromsizes/main.nf b/modules/nf-core/custom/getchromsizes/main.nf index e8084ea..5b2cfa4 100644 --- a/modules/nf-core/custom/getchromsizes/main.nf +++ b/modules/nf-core/custom/getchromsizes/main.nf @@ -1,5 +1,5 @@ process CUSTOM_GETCHROMSIZES { - tag "$fasta" + tag "${fasta.baseName.replaceAll(/[^a-zA-Z0-9_-]/, '_')}" label 'process_single' conda "${moduleDir}/environment.yml"