Hi @mribeirodantas
I’ve looked at the code already in the links I put in the post earlier.
I don’t know how mix would be helpful here.
I’ve three channels as:
ch_fastp_normal = Channel.of(
[ [batch:'SEMA-MM-001', timepoint:'MM-0486-T-01', tissue:'normal', sequencing_type:'wes'],
tuple( file('normal_wes_fastq1.gz'),file('normal_wes_fastq2.gz')),file('1_normal.html'),file('1_normal.json') ],
[ [batch:'SEMA-MM-001', timepoint:'MM-0487-T-01', tissue:'normal', sequencing_type:'wes'],
tuple( file('normal_wes_fastq1.gz'),file('normal_wes_fastq2.gz')),file('1_normal.html'),file('1_normal.json') ]
)
ch_fastp_tumor = Channel.of(
[ [batch:'SEMA-MM-001', timepoint:'MM-0486-T-01', tissue:'tumor', sequencing_type:'wes'],
tuple( file('tumor_wes_fastq1.gz'),file('tumor_wes_fastq2.gz')),file('1_tumor.html'),file('1_tumor.json') ],
[ [batch:'SEMA-MM-001', timepoint:'MM-0487-T-01', tissue:'tumor', sequencing_type:'wes'],
tuple( file('tumor_wes_fastq1.gz'),file('tumor_wes_fastq2.gz')),file('1_tumor.html'),file('1_tumor.json') ]
)
ch_rna_fastp_tumor = Channel.of(
[ [batch:'SEMA-MM-001', timepoint:'MM-0486-T-01', tissue:'rna', sequencing_type:'wes'],
tuple( file('rna_fastq1.gz'),file('rna_fastq2.gz')),file('1_rna.html'),file('1_rna.json') ]
)
I mix them:
ch_fastp_normal.mix(ch_fastp_tumor).mix(ch_rna_fastp_tumor).groupTuple().collect().set{grouped_mixed}
grouped_mixed.view()
I get output as:
[[‘batch’:‘SEMA-MM-001’, ‘timepoint’:‘MM-0486-T-01’, ‘tissue’:‘normal’, ‘sequencing_type’:‘wes’],
[[/mnt/data1/users//nextflow/learn_nextflow/normal_wes_fastq1.gz,
/mnt/data1/users//nextflow/learn_nextflow/normal_wes_fastq2.gz]],
[/mnt/data1/users//nextflow/learn_nextflow/1_normal.html],
[/mnt/data1/users//nextflow/learn_nextflow/1_normal.json],
[‘batch’:‘SEMA-MM-001’, ‘timepoint’:‘MM-0486-T-01’, ‘tissue’:‘tumor’, ‘sequencing_type’:‘wes’],
[[/mnt/data1/users//nextflow/learn_nextflow/tumor_wes_fastq1.gz,
/mnt/data1/users//nextflow/learn_nextflow/tumor_wes_fastq2.gz]],
[/mnt/data1/users//nextflow/learn_nextflow/1_tumor.html],
[/mnt/data1/users//nextflow/learn_nextflow/1_tumor.json],
[‘batch’:‘SEMA-MM-001’, ‘timepoint’:‘MM-0487-T-01’, ‘tissue’:‘normal’, ‘sequencing_type’:‘wes’],
[[/mnt/data1/users//nextflow/learn_nextflow/normal_wes_fastq1.gz,
/mnt/data1/users//nextflow/learn_nextflow/normal_wes_fastq2.gz]],
[/mnt/data1/users//nextflow/learn_nextflow/1_normal.html],
[/mnt/data1/users//nextflow/learn_nextflow/1_normal.json],
[‘batch’:‘SEMA-MM-001’, ‘timepoint’:‘MM-0486-T-01’, ‘tissue’:‘rna’, ‘sequencing_type’:‘wes’],
[[/mnt/data1/users//nextflow/learn_nextflow/rna_fastq1.gz,
/mnt/data1/users//nextflow/learn_nextflow/rna_fastq2.gz]],
[/mnt/data1/users//nextflow/learn_nextflow/1_rna.html],
[/mnt/data1/users//nextflow/learn_nextflow/1_rna.json],
[‘batch’:‘SEMA-MM-001’, ‘timepoint’:‘MM-0487-T-01’, ‘tissue’:‘tumor’, ‘sequencing_type’:‘wes’],
[[/mnt/data1/users//nextflow/learn_nextflow/tumor_wes_fastq1.gz,
/mnt/data1/users//nextflow/learn_nextflow/tumor_wes_fastq2.gz]],
[/mnt/data1/users//nextflow/learn_nextflow/1_tumor.html],
[/mnt/data1/users//nextflow/learn_nextflow/1_tumor.json]]
What I’d have desired is, per sample RNA-WES_tumor-WES_normal or where RNA are missing WES_tumor-WES_normal
Second, I do not know how to pass this mixed channel, as the number of inputs could be variable.