Workflow gets hung up on subworkflows .view() call...
# help
s
Workflow gets hung up on subworkflows .view() call. View() works fine outside of it, How i am calling the subworkflow
Copy code
def longpac_longpolish = SAMPLESHEETFILTERING.out.list_longpac_longPolish
    def flattened_result = longpac_longpolish
        .filter { value -> value instanceof List && !value.isEmpty() }
        .flatMap()
    flattened_result.view()
PACBIO_SUBWORKFLOW(flattened_result)
it views() fine, emitting [[id:Sample1, polish:long, basecaller:NA], short1NA, short2NA, TestDatasetNfcore/Pacbio_illuminaPolish/PacbioSRR27591472.hifi.fastq.gz, assemblyNA] [[id:Sample2, polish:long, basecaller:NA], short1NA, short2NA, TestDatasetNfcore/Pacbio_illuminaPolish/PacbioSRR27591472.hifi.fastq.gz, assemblyNA] but when i pass it to the subworkflow
Copy code
workflow PACBIO_SUBWORKFLOW {

    take:
    ch_input_full // channel: [ val(meta), files/data, files/data, files/data..etc ]
    // bam_file
    // polish
    // gambitdb
    // krakendb

    main:
    def ch_output = Channel.empty()
    def ch_versions = Channel.empty()
    println("hello")
    ch_input_full.view()
It just prints hello, and gets hung up, doesn't seem to ever print the channel values? just sits there. I dont understand why? my nextflow.log also says all processes finished, all barriers passed
Copy code
Aug-22 13:23:17.907 [main] DEBUG nextflow.script.ScriptRunner - > Awaiting termination 
Aug-22 13:23:17.907 [main] DEBUG nextflow.Session - Session await
Aug-22 13:23:17.907 [main] DEBUG nextflow.Session - Session await > all processes finished
Aug-22 13:23:17.908 [main] DEBUG nextflow.Session - Session await > all barriers passed
I am dumb, I fixed many of my headaches by just changing the output of samplesheetfilter to cahnnels with Channel.fromList. my fault
n
Glad you got it working! Keep in mind though that
println
calls get executed on pipeline startup and the
.view()
operator only prints the channel content when the channel has been populated so this might not happen right after the
println