@@ -676,9 +676,6 @@ workflow DIFFERENTIALABUNDANCE {
676676
677677 // Make (and optionally deploy) the shinyngs app
678678
679- ch_shinyngs = ch_paramsets
680- .filter{ it. params. shinyngs_build_app }
681-
682679 // To prepare the input for shinyngs app we need to first make sure that the differential
683680 // results are parsed in the same order as the contrast file
684681 // To do so, as we cannot rely on the order of the channels as they are asynchronous, we
@@ -687,7 +684,7 @@ workflow DIFFERENTIALABUNDANCE {
687684
688685 // Create a channel with the differential results and the corresponding map with
689686 // the contrast entries
690- differential_with_contrast = ch_shinyngs
687+ differential_with_contrast = ch_paramsets
691688 .join( ch_differential_results
692689 .filter { meta , contrast , results -> contrast. variable?. trim() }
693690 .groupTuple()
@@ -715,7 +712,7 @@ workflow DIFFERENTIALABUNDANCE {
715712 }
716713 // parse the channel to have the contrast file with the corresponding meta
717714 .map { [it. baseName, it] }
718- .join( ch_shinyngs . map { [it. paramset_name, it] } )
715+ .join( ch_paramsets . map { [it. paramset_name, it] } )
719716 .map { paramset_name, contrast_file, meta ->
720717 [meta, contrast_file]
721718 }
@@ -724,12 +721,14 @@ workflow DIFFERENTIALABUNDANCE {
724721 ch_shinyngs_input = differential_with_contrast. differential_results
725722 .join(ch_contrasts_sorted)
726723 .join(ch_all_matrices)
724+ .filter { row ->
725+ row[0 ]. params. shinyngs_build_app
726+ }
727727 .multiMap { meta, meta_with_contrast, differential_results, contrast_file, samplesheet, features, matrices ->
728728 matrices : [meta, samplesheet, features, matrices]
729729 contrasts_and_differential : [meta, contrast_file, differential_results]
730730 contrast_stats_assay : meta. params. exploratory_assay_names. split(' ,' ). findIndexOf { it == meta. params. exploratory_final_assay } + 1
731731 }
732-
733732 SHINYNGS_APP (
734733 ch_shinyngs_input. matrices, // meta, samples, features, [ matrices ]
735734 ch_shinyngs_input. contrasts_and_differential, // meta, contrast file, [ differential results ]
0 commit comments