From 26bd1d09438f44f4177585888530982de234d698 Mon Sep 17 00:00:00 2001 From: "Huska, Matthew" Date: Wed, 13 Dec 2023 12:20:52 +0100 Subject: [PATCH] Update fastq_from_bam to publish illumina data properly. Regexes are geting crazy, need to rethink this. --- modules/alignment_processing.nf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/alignment_processing.nf b/modules/alignment_processing.nf index 0f908f7..ca3b693 100644 --- a/modules/alignment_processing.nf +++ b/modules/alignment_processing.nf @@ -152,6 +152,8 @@ process fastq_from_bam { fn.matches('.*.mapped_merged.fast[aq].gz$') ? "removed/${fn}".replaceAll(~'.mapped_merged(.fast[aq].gz)$', '$1') : fn.matches('.*.unmapped_merged_merged.fast[aq].gz$') ? "clean/${fn}".replaceAll(~'.unmapped_merged_merged(.fast[aq].gz)$', '$1') : fn.matches('.*.soft-clipped_merged.fast[aq].gz$') ? "clean/${fn}".replaceAll(~'.soft-clipped_merged(.fast[aq].gz)$', '$1') : + fn.matches('.*.unmapped_(1|2|singleton).fast[aq].gz$') ? "clean/${fn}".replaceAll(~'.unmapped_(1|2|singleton)(.fast[aq].gz)$', '_$1$2') : + fn.matches('.*.mapped_(1|2|singleton).fast[aq].gz$') ? "removed/${fn}".replaceAll(~'.mapped_(1|2|singleton)(.fast[aq].gz)$', '_$1$2') : fn } )