Skip to content

Commit 24a935a

Browse files
committed
Modify sintax for creation of bundle input
1 parent 7bc4bf7 commit 24a935a

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

workflows/differentialabundance.nf

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -842,15 +842,16 @@ workflow DIFFERENTIALABUNDANCE {
842842

843843
// Make a report bundle comprising the markdown document and all necessary
844844
// input files
845-
846-
ch_bundle_input = QUARTONOTEBOOK.out.notebook
847-
.map { meta, notebook -> notebook }.collect()
848-
.combine(ch_report_input.input_files.groupTuple().map { meta, files_list -> [meta, files_list[0]] }) // Take input files once per paramset
849-
.map {
850-
def notebooks = it[0..-3] // All elements except the last two (meta and input_files)
851-
def meta = it[-2] // Second to last element is meta
852-
def input_files = it[-1] // Last element is input files
853-
[meta, notebooks + input_files] // [meta, [notebooks + input_files]]
845+
ch_bundle_input = ch_bundle_input = ch_report_input.input_files
846+
.first() // Take only the first meta/input_files pair
847+
.combine(
848+
QUARTONOTEBOOK.out.notebook
849+
.map { meta, notebook -> notebook }
850+
.collect()
851+
.map { notebooks -> [notebooks] } // Wrap all notebooks in list to prevent flattening during combine
852+
)
853+
.map { meta, input_files, all_notebooks ->
854+
[meta, input_files + all_notebooks]
854855
}
855856

856857
MAKE_REPORT_BUNDLE( ch_bundle_input )

0 commit comments

Comments
 (0)