Hi There,
I’d like to do a join on a branched channel and a multi channel.
I get output from a applybqsr
process as:
output:
tuple val(meta) ,path("${patient_id}.sorted.markdup.recal.bam"), path("${patient_id}.sorted.markdup.recal.bai"), emit: recal_bam_bai
I branch it out as:
applybqsr.out.recal_bam_bai.branch { meta, bam, bai ->
normal: meta.tissue == "normal"
return [ meta.timepoint, meta, bam, bai ]
tumor: meta.tissue == "tumor"
return [ meta.timepoint, meta, bam, bai ]
other: true
}.set { ch_branched }
I’ve another process where consensus regions are generated where output is defined as:
output:
tuple val(meta), path("regions.txt"), emit: regions_txt
tuple val(meta), path("consensus.vcf"), emit: consensus_vcf
I’d like to send only tumor applybqsr and regions file to a process.
I try to do a join on these as the following:
consensus.out.regions_txt.map{meta,regions_file->[ "${meta.timepoint}", meta,regions_file ]}
.join(ch_branched.tumor.map{meta,bam_bai ->["${meta.timepoint}",meta,bam_bai]}, failOnMismatch:true, failOnDuplicate:true)
.multiMap{pid, meta1, regions_file, meta2, bam_bai ->
regions:[meta1, regions_file]
tumor_recal:[meta2, bam_bai]
}.set { ch_input_tumor_consensus }
I get error as:
ERROR ~ Invalid method invocation
call
with arguments: [MM-0486-T-01, [batch:SEMA-MM-001, timepoint:MM-0486-T-01, tissue:tumor, sequencing_type:wes], /mnt/data1/users/sanjeev/nextflow/meta_structure/work/0e/5efc4c5ad6c9776e3db00d2165ece2/MM-0486-T-01_T.sorted.markdup.recal.bam, /mnt/data1/users/sanjeev/nextflow/meta_structure/work/0e/5efc4c5ad6c9776e3db00d2165ece2/MM-0486-T-01_T.sorted.markdup.recal.bai] (java.util.ArrayList) on _closure21 type
– Check ‘.nextflow.log’ file for details
How do I resolve it?