tuple nextflow
1
0
Entering edit mode
3.1 years ago
Nobody ▴ 30

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
ADD COMMENT
1
Entering edit mode
3.1 years ago

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
"""
}
ADD COMMENT
0
Entering edit mode

i have : tuple val(id), Path from XXX

so it's like this :

[id, path]

?? And thank you a lot for ur help

ADD REPLY
0
Entering edit mode

so it's like this :

[id, path]

yes

ADD REPLY

Login before adding your answer.

Traffic: 2119 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6