From 41738f0615536a719d8525403e4936a6fcdd2a67 Mon Sep 17 00:00:00 2001 From: Ally Hawkins <54039191+allyhawkins@users.noreply.github.com> Date: Wed, 1 May 2024 10:27:21 -0500 Subject: [PATCH] make sure that processed file isn't empty --- merge.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/merge.nf b/merge.nf index 0a4c42da..f416fa07 100644 --- a/merge.nf +++ b/merge.nf @@ -185,8 +185,8 @@ workflow { it.library_id, file("${params.results_dir}/${it.project_id}/${it.sample_id}/${it.library_id}_processed.rds") ]} - // only include libraries that have been processed through scpca-nf - .filter{file(it[2]).exists()} + // only include libraries that have been processed through scpca-nf and aren't empty + .filter{file(it[2]).exists() && file(it[2]).size() > 0} // only one row per library ID, this removes all the duplicates that may be present due to CITE/hashing .unique() // group tuple by project id: [project_id, [library_id1, library_id2, ...], [sce_file1, sce_file2, ...]]