Commit bc05b720 authored by Ludovic Legrand's avatar Ludovic Legrand
Browse files

amelioration des print, sortie repertoire specifique, suppression de when

parent 9c2a39f0
......@@ -4,7 +4,7 @@ chanFastq = Channel.fromFilePairs( './rawdata/dev/control/SRR*_{1,2}.fastq.gz',
num = [0, 1, 2]
process gunzip {
publishDir('result')
publishDir('result/process.each')
tag("${id} ${num}")
input:
......
......@@ -6,7 +6,7 @@ chanNum = Channel.of(0, 1, 2)
chanFastq.count().view( c -> "file number in channel: ${c}")
process gunzip {
publishDir('result')
publishDir('result/process.multichannel')
tag("${id} ${num}")
input:
......
......@@ -3,7 +3,7 @@ nextflow.enable.dsl=2
chanFastq = Channel.fromFilePairs( './rawdata/dev/control/SRR*_{1,2}.fastq.gz', size: 2, checkIfExists: true)
process gunzip {
publishDir('result')
publishDir('result/process.simple')
tag("${id}") // id correspond a la variable dans input
input:
......@@ -14,19 +14,19 @@ process gunzip {
script:
// ici du groovy
println("groovy: " + id)
println("[groovy]: fastqID: " + id)
toto = "titi"
"""
# ici ce qui me plait, par défaut du bash
#!/usr/bin/env bash
gzip -kcd ${reads[0]} > ${id}.R1.fastq
touch myfile
echo $i{toto}
echo ${toto}
"""
}
workflow {
gunzip(chanFastq)
//gunzip.out[0].view()
gunzip.out.outfile.view()
gunzip.out.outfile.view { of -> "[process output] ${of}" }
}
......@@ -4,7 +4,7 @@ nextflow.enable.dsl=2
chanFastq = Channel.fromFilePairs( './rawdata/dev/control/SRR*_{1,2}.fastq.gz', size: 2, checkIfExists: true)
process gunzip {
publishDir('result')
publishDir('result/process.simplepipes')
tag("${id}") // id correspond a la variable dans input
input:
......@@ -14,19 +14,16 @@ process gunzip {
path('*.fastq')
script:
// ici du groovy
println("groovy: " + id)
println("[groovy][gunzip] fastqID: " + id)
"""
# ici ce qui me plait, par défaut du bash
#!/usr/bin/env bash
gzip -kcd ${reads[0]} > ${id}.R1.fastq
touch myfile
"""
}
process gzip {
publishDir('result')
tag("${id}")
publishDir('result/process.simplepipes')
tag("${reads}")
input:
path(reads)
......@@ -35,6 +32,7 @@ process gzip {
path('*.fastq.gz')
script:
println("[groovy][gzip] file: " + reads)
"""
#!/usr/bin/env bash
gzip -kc ${reads} > ${reads}.gz
......@@ -43,4 +41,5 @@ gzip -kc ${reads} > ${reads}.gz
workflow {
gunzip(chanFastq) | gzip
gzip.out[0].view { "[gzip output] " + it}
}
nextflow.enable.dsl=2
chanFastq = Channel.fromFilePairs( './rawdata/dev/control/SRR*_{1,2}.fastq.gz', size: 2, checkIfExists: true)
process gunzip {
publishDir('result')
tag("${id}") // id correspond a la variable dans input
input:
tuple val(id), path(reads)
output:
path('*.fastq', emit: outfile)
when:
reads[0].endsWith("gz")
script:
// ici du groovy
println("groovy: " + id)
"""
# ici ce qui me plait, par défaut du bash
#!/usr/bin/env bash
gzip -kcd ${reads[0]} > ${id}.R1.fastq
touch myfile
"""
}
workflow {
gunzip(chanFastq)
gunzip.out.outfile.view()
}
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