pairOfFiles = Channel.from([file('./A-1.txt'),file('./B-1.txt')], [file('./A-2.txt'),file('./B-2.txt')],
[file('./A-3.txt'),file('./B-3.txt')], [file('./A-4.txt'),file('./B-4.txt')],
[file('./A-5.txt'),file('./B-5.txt')])
pairOfFiles
.buffer(size: 2, remainder: true)
.set { ArrayFiles }
[[A-1.txt, B-1.txt], [A-2.txt, B-2.txt]]
[[A-3.txt, B-3.txt], [A-4.txt, B-4.txt]]
[[A-5.txt, B-5.txt]]
command file_type_A file_type_B
A-1.txt,B-1.txt
A-2.txt,B-2.txt
Channel.fromPath('file*').buffer(size: 2, remainder: true).set { pairOfFiles }process foo {input: file x from pairOfFiles"""echo $x"""}
--
You received this message because you are subscribed to the Google Groups "Nextflow" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nextflow+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/nextflow.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to nextflow+u...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to nextflow+unsubscribe@googlegroups.com.
( ['./A-1.txt', './B-1.txt'], ['./A-2.txt', './B-2.txt'], ['./A-3.txt', './B-3.txt'], ['./A-4.txt', './B-4.txt'], ['./A-5.txt', './B-5.txt'] )
( [['./A-1.txt', './B-1.txt'], ['./A-2.txt', './B-2.txt']] , [['./A-3.txt', './B-3.txt'], ['./A-4.txt', './B-4.txt']] , [['./A-5.txt', './B-5.txt']] )
Submitted process > process foo ([['./A-1.txt', './B-1.txt'], ['./A-2.txt', './B-2.txt']])
Submitted process > process foo ([['./A-3.txt', './B-3.txt'], ['./A-4.txt', './B-4.txt']])
Submitted process > process foo ([['./A-5.txt', './B-5.txt']])
command A-1.txt B-1.txt
command A-2.txt B-2.txt
To unsubscribe from this group and stop receiving emails from it, send an email to nextflow+unsubscribe@googlegroups.com.
The groovy syntax:
"command foo".execute()
or even using the "three double-quote" nextflow syntax like:process foo {
input:
val groovy_array from BAR
script:
groovy_array.each { it ->
"""
command $it
"""
}
}
Channel.from(1..5).buffer(size: 3, remainder: true).set { ch_ids }Channel.fromPath('A-*.txt').buffer(size: 3, remainder: true).set { ch_a }Channel.fromPath('B-*.txt').buffer(size: 3, remainder: true).set { ch_b }process launchArrayJobs {echo trueinput:val ids from ch_idsfile file_a from ch_afile file_b from ch_bscript:assert ids.size() == file_a.size()assert ids.size() == file_b.size()def cmd = ''for( int i=0; i<ids.size(); i++ ) {cmd += "echo command ${ids[i]} ${file_a[i]} ${file_b[i]}"}cmd}
To unsubscribe from this group and stop receiving emails from it, send an email to nextflow+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to nextflow+unsubscribe@googlegroups.com.