From 22be57508c6c5be9b31a74ca5659a82fd24a7e44 Mon Sep 17 00:00:00 2001 From: "Stephanie J. Spielman" Date: Mon, 5 Feb 2024 09:36:42 -0500 Subject: [PATCH] remove duplicated code in cell type module --- modules/classify-celltypes.nf | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/modules/classify-celltypes.nf b/modules/classify-celltypes.nf index cb5af43f..5cb155d8 100644 --- a/modules/classify-celltypes.nf +++ b/modules/classify-celltypes.nf @@ -129,30 +129,6 @@ workflow annotate_celltypes { take: sce_files_channel // channel of meta, unfiltered_sce, filtered_sce, processed_sce main: - // read in sample metadata and make a list of cell line samples; these won't be cell typed - cell_line_samples = Channel.fromPath(params.sample_metafile) - .splitCsv(header: true, sep: '\t') - .map{ - [ - sample_id: it.scpca_sample_id, - is_cell_line: Utils.parseNA(it.is_cell_line).toBoolean() // FALSE -> false, NA -> false, TRUE -> true - ] - } - .filter{it.is_cell_line} - .map{it.sample_id} - .toList() - - // branch to cell type the non-cell line libraries only - sce_files_channel_branched = sce_files_channel - .branch{ - cell_line: it[0]["sample_id"].split(",").collect{it in cell_line_samples.getVal()}.every() - // only run cell typing on tissue samples - tissue: true - } - - // get just the meta and processed sce from the tissue (not cell line) samples - processed_sce_channel = sce_files_channel_branched.tissue.map{[it[0], it[3]]} - // read in sample metadata and make a list of cell line samples; these won't be cell typed cell_line_samples = Channel.fromPath(params.sample_metafile) .splitCsv(header: true, sep: '\t')