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, ...]]