tuple nextflow
1
Hi !
I'm a newbie nextflow user, i can't understand the operating mode of "tuple val(sample)".
Does it create two channels and use two channels ? so we can use it only if we have two files comming from previous channel ?
Thank you !
nextflow
• 3.0k views
a tuple is used when the Channel contains more than one value.
"tuple val(sample)"
with only one value 'sample' looks strange to me....
for example if a channel contains 3 columns
+-------+-----------+----------------------+
| chrom | size | fileName |
+-------+-----------+----------------------+
| chr1 | 249250621 | /gbdb/hg19/hg19.2bit |
| chr2 | 243199373 | /gbdb/hg19/hg19.2bit |
| chr3 | 198022430 | /gbdb/hg19/hg19.2bit |
| chr4 | 191154276 | /gbdb/hg19/hg19.2bit |
| chr5 | 180915260 | /gbdb/hg19/hg19.2bit |
| chr6 | 171115067 | /gbdb/hg19/hg19.2bit |
| chr7 | 159138663 | /gbdb/hg19/hg19.2bit |
| chrX | 155270560 | /gbdb/hg19/hg19.2bit |
| chr8 | 146364022 | /gbdb/hg19/hg19.2bit |
| chr9 | 141213431 | /gbdb/hg19/hg19.2bit |
+-------+-----------+----------------------+
a process would look like:
process test {
input:
tuple chrom,chromLen,bitPath from my_input_channel
output:
tuple chrom,path("output.txt") into test_out
script:
"""
ls -lah '${bitPath}' > output.txt
"""
}
Login before adding your answer.
Traffic: 2119 users visited in the last hour
i have : tuple val(id), Path from XXX
so it's like this :
[id, path]
?? And thank you a lot for ur help
yes