Skip to content

Commit 4ddebf9

Browse files
author
kevinmhadi
committed
GRIDSS somatic filtering workflow refactor.
1 parent e78618f commit 4ddebf9

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • subworkflows/local/bam_svcalling_gridss

subworkflows/local/bam_svcalling_gridss/main.nf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ workflow GRIDSS_SOMATIC_FILTER_STEP {
6565
vcf = vcf.map { it ->
6666
[ it[0].patient, [ it[0], it[1], it[2] ] ] // meta.patient, [vcf, vcf_index]
6767
}
68+
.dump(tag: "vcf mapped to patient for GRIDSS_SOMATIC_FILTER_STEP", pretty: true)
6869
.join(
6970
inputs_unlaned.filter {it -> it.meta.status.toString() == "0"}.map { it -> [ it.meta.patient, [ it.meta + [ normal_id: it.meta.sample ] ] ]}.unique(),
7071
remainder: true
@@ -74,7 +75,7 @@ workflow GRIDSS_SOMATIC_FILTER_STEP {
7475
def (_key, existing, meta_input_lst) = (it + [null, null])[0..2]
7576
def (meta_existing, vcf_existing, tbi_existing) = existing ?: [null, null, null]
7677
def meta_input = meta_input_lst ? meta_input_lst[0] : null // should only be one entry in the list since we unique by patient, but just in case we take the first
77-
if (meta_input != null) {
78+
if (meta_existing && meta_input) { // Need to test for both because vcf may be an empty channel depending on state of the dag, i.e. if only aligner is specified as the tool, this process is still instantiated but the vcf channel default is not inherited from a prior process.
7879
meta_existing = meta_existing + [ normal_id: meta_input.normal_id ]
7980
}
8081
[ meta_existing, vcf_existing, tbi_existing ]

0 commit comments

Comments
 (0)