Hi Developers,
I’m using following code to read in some data (attached)
workflow {
Channel.fromPath("long_format_data.csv")
.splitCsv(header: true).map { it ->
[
it.subMap("batch", "timepoint", "tissue", "sequencing_type"),
[
file(it.fastq_1),
file(it.fastq_2)
]
]
}
.branch { meta, fastq ->
rna: meta.tissue == "rna" && meta.sequencing_type == "rna"
germline: meta.tissue == "normal" && meta.sequencing_type == "wes"
tumor: meta.tissue == "tumor" && meta.sequencing_type == "wes"
other: true
}
.set { input_ch }
//input_ch.germline| dump{tag: 'analysis', pretty: true}
input_ch.germline.view()
}
It prints following as expected I guess:
[[batch:SEMA-MM-001, timepoint:MM-3309-T-01, tissue:normal, sequencing_type:wes], [/data1/raw_data/WES/sema4/SEMA-MM-001DNA/MM-3309-DNA-N-01-01_L001_R1_001.fastq.gz, /data1/raw_data/WES/sema4/SEMA-MM-001DNA/MM-3309-DNA-N-01-01_L001_R2_001.fastq.gz]]
[[batch:SEMA-MM-001, timepoint:MM-0489-T-01, tissue:normal, sequencing_type:wes], [/data1/raw_data/WES/sema4/SEMA-MM-001DNA/MM-0489-DNA-N-01-01_L001_R1_001.fastq.gz, /data1/raw_data/WES/sema4/SEMA-MM-001DNA/MM-0489-DNA-N-01-01_L001_R2_001.fastq.gz]]
[[batch:SEMA-MM-001, timepoint:MM-0487-T-01, tissue:normal, sequencing_type:wes], [/data1/raw_data/WES/sema4/SEMA-MM-001DNA/MM-0487-DNA-N-01-01_L001_R1_001.fastq.gz, /data1/raw_data/WES/sema4/SEMA-MM-001DNA/MM-0487-DNA-N-01-01_L001_R2_001.fastq.gz]]
[[batch:SEMA-MM-001, timepoint:MM-0486-T-01, tissue:normal, sequencing_type:wes], [/data1/raw_data/WES/sema4/SEMA-MM-001DNA/MM-0486-DNA-N-01-01_L001_R1_001.fastq.gz, /data1/raw_data/WES/sema4/SEMA-MM-001DNA/MM-0486-DNA-N-01-01_L001_R2_001.fastq.gz]]
[[batch:SEMA-MM-001, timepoint:MM-0256-T-02, tissue:normal, sequencing_type:wes], [/data1/raw_data/WES/sema4/SEMA-MM-001DNA/MM-0256-DNA-N-01-01_L001_R1_001.fastq.gz, /data1/raw_data/WES/sema4/SEMA-MM-001DNA/MM-0256-DNA-N-01-01_L001_R2_001.fastq.gz]]
[[batch:SEMA-MM-001, timepoint:MM-0364-T-02, tissue:normal, sequencing_type:wes], [/data1/raw_data/WES/sema4/SEMA-MM-001DNA/MM-0364-DNA-N-01-01_L001_R1_001.fastq.gz, /data1/raw_data/WES/sema4/SEMA-MM-001DNA/MM-0364-DNA-N-01-01_L001_R2_001.fastq.gz]]
I’m new to the world of groovy, nextflow thus I’m having some difficulty.
What kind of variable is input_ch
? Is it a list or a multi-channel or an array or
something else?
Please help me to understand the variable.
Thanks
long_format_data.csv (11.8 KB)