Commit 43d87ce6 authored by Ludovic Legrand's avatar Ludovic Legrand
Browse files

amélioration des sorties; changement dans multichannel

parent 0d45aa98
......@@ -15,15 +15,15 @@ process gunzip {
path('*.fastq', emit: outfile)
script:
println("groovy: " + id + " num: " + num)
println("[groovy] fastqID: " + id + " num: " + num)
"""
#!/usr/bin/env bash
gzip -kcd $reads[0] > ${id}.R1.${readNum}.fastq
gzip -kcd $reads[0] > ${id}.R1.${num}.fastq
touch myfile
"""
}
workflow {
gunzip(chanFastq, num)
gunzip.out.outfile.view()
gunzip.out.outfile.view { of -> "[process output] ${of}" }
}
nextflow.enable.dsl=2
chanFastq = Channel.fromFilePairs( './rawdata/dev/control/SRR*_{1,2}.fastq.gz', size: 2, checkIfExists: true)
chanFastq = Channel.fromPath( './rawdata/dev/control/SRR*_{1,2}.fastq.gz', checkIfExists: true)
chanNum = Channel.of(0, 1, 2)
chanFastq.count().view( c -> "file number in channel: ${c}")
process gunzip {
publishDir('result')
tag("${id} ${num}")
input:
tuple val(id), path(reads)
path(reads)
val(num)
output:
path('*.fastq', emit: outfile)
script:
println("groovy: " + id + " num: " + num)
readNum = num + 1
readFile = reads[num]
println("[groovy] read: " + reads + " num: " + num)
"""
#!/usr/bin/env bash
gzip -kcd $readFile > ${id}.R${readNum}.fastq
touch myfile
gzip -kcd $reads > output.${num}.fastq
"""
}
workflow {
gunzip(chanFastq, chanNum)
gunzip.out.outfile.view()
gunzip.out.outfile.view { of -> "[process output] ${of}" }
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment