Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
inter_CATI_omics
Hackathon_octobre2021
atelier_repro
Commits
cf611616
Commit
cf611616
authored
Oct 11, 2021
by
Ludovic Legrand
Browse files
05operateurs
parent
9664fa00
Changes
4
Hide whitespace changes
Inline
Side-by-side
Nextflow/05operateurs/operateur.collect.nf
View file @
cf611616
...
...
@@ -3,17 +3,17 @@ nextflow.enable.dsl=2
chanFastq = Channel.fromPath( './rawdata/dev/control/SRR*_{1,2}.fastq.gz', checkIfExists: true)
process collectme {
publishDir('result')
publishDir('result
/05operateurs
')
input:
path(reads)
output:
path('
*.fastq
', emit: outfile)
path('
collect.log
', emit: outfile)
script:
"""
ls -l *.gz >
list.fastq
ls -l *.gz >
collect.log
"""
}
...
...
Nextflow/05operateurs/operateur.collect2.nf
View file @
cf611616
...
...
@@ -4,18 +4,18 @@ test = Channel.fromPath('./rawdata/dev/control/*.fastq.gz')
process gunzip {
publishDir('result')
publishDir('result
/05operateurs/
')
input:
val(par)
output:
path('log')
path('
collect2.
log')
script:
println(par.join(' '))
"""
echo $par > log
echo $par >
collect2.
log
"""
}
...
...
Nextflow/05operateurs/operateur.grouptuple.nf
View file @
cf611616
...
...
@@ -2,8 +2,7 @@ nextflow.enable.dsl=2
chanFastq = Channel.fromPath( './dataset.csv' ).splitCsv(header: ['sample', 'fileR1', 'fileR2'])
//chanFastq.view()
//chanFastq.view { "[channel] csv:$it" }
//chanFastq.map {[it.sample,[it.fileR1, it.fileR2]]}.groupTuple().view()
...
...
@@ -15,11 +14,11 @@ process mock1 {
output:
tuple val(sample), path('*.sam'), emit: outfile
path('
*
.sh'), emit: debug
tuple val(sample),
path('
mock
.sh'), emit: debug
script:
"""
echo "bwa genome ${read1} ${read2} > ${
sample
}.sam" > mock.sh
echo "bwa genome ${read1} ${read2} > ${
read1
}.sam" > mock.sh
touch ${read1}.sam
"""
}
...
...
@@ -31,8 +30,7 @@ process mock2 {
tuple val(sample), path(sam)
output:
tuple val(sample), path('*merged.sam'), emit: outfile
path('*.sh'), emit: debug optional true
tuple val(sample), path('*merged.sam'), path('mock.sh'), emit: outfile
script:
if(sam.collect().size > 1) {
...
...
@@ -43,6 +41,7 @@ touch ${sample}.merged.sam
}
else {
"""
echo "cp ${sam} ${sample}.merged.sam" > mock.sh
touch ${sample}.merged.sam
"""
}
...
...
@@ -51,9 +50,8 @@ touch ${sample}.merged.sam
workflow {
mock1(chanFastq)
//
mock1.out.debug.view
()
//
mock1.out.outfile.view
()
mock1.out.debug.view
{ sample, script -> "[mock1] sample: ${sample} \t script: $script" }
mock1.out.outfile.view
{ sample, file -> "[mock1] sample: ${sample} \t file:${file}" }
mock2(mock1.out.outfile.groupTuple())
//mock2.out.debug.view()
mock2.out.outfile.view()
mock2.out.outfile.view { sample, file, script -> "[mock2] sample: ${sample} \t file:${file} \t script: ${script}" }
}
Nextflow/img/.gitkeep
0 → 100644
View file @
cf611616
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment