Skip to content
GitLab
Menu
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
9664fa00
Commit
9664fa00
authored
Oct 08, 2021
by
Ludovic Legrand
Browse files
amelioration de 04config
parent
538a6002
Pipeline
#42631
passed with stage
in 1 minute and 46 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Nextflow/04configuration_environnement/conf.
executor
.nf
→
Nextflow/04configuration_environnement/conf.
conda1
.nf
View file @
9664fa00
nextflow.enable.dsl=2
chanFastq = Channel.fromFilePairs( params.reads, size: 2, checkIfExists: true)
modeList = ['multithread', 'local']
process index {
storeDir 'indices/bwa'
...
...
@@ -15,6 +14,7 @@ process index {
path("$genome*", emit: indices)
script:
println("[default] cpus: ${task.cpus} ; ${task.memory}")
"""
bwa index $genome
"""
...
...
@@ -37,6 +37,7 @@ process mapping {
path('*.sam')
script:
println("[mutlithread] mapping: ${task.cpus} ; ${task.memory}")
"""
bwa mem -t ${task.cpus} ${genome} $reads > ${id}.mapping.sam
"""
...
...
Nextflow/04configuration_environnement/conf.conda2.nf
0 → 100644
View file @
9664fa00
nextflow.enable.dsl=2
chanFastq = Channel.fromFilePairs( params.reads, size: 2, checkIfExists: true)
process index {
storeDir 'indices/bwa'
input:
path(genome)
output:
path("$genome*", emit: indices)
script:
println("[default] cpus: ${task.cpus} ; ${task.memory}")
"""
bwa index $genome
"""
}
process mapping {
publishDir("${params.outdir}/01.mapping")
tag("${id}")
label "multithread"
input:
tuple val(id), path(reads)
path(index)
path(genome)
output:
path('*.sam')
path('mapping.version')
script:
println("[mutlithread] mapping: ${task.cpus} ; ${task.memory}")
"""
bwa 2>&1 | grep -i version > mapping.version
bwa mem -t ${task.cpus} ${genome} $reads > ${id}.mapping.sam
"""
}
workflow {
index(params.genome)
mapping(chanFastq, index.out.indices, params.genome)
}
Nextflow/04configuration_environnement/conf.simple.nf
View file @
9664fa00
...
...
@@ -5,6 +5,7 @@ chanFastq = Channel.fromFilePairs( params.reads, size: 2, checkIfExists: true) /
process gunzip {
publishDir(params.outdir) //change
tag("${id}") // id correspond a la variable dans input
label 'multithread'
input:
tuple val(id), path(reads)
...
...
@@ -13,8 +14,7 @@ process gunzip {
path('*.fastq')
script:
// ici du groovy
println("groovy: " + id)
println("[multithread] fastqID: ${id} ; cpus: ${task.cpus} ; executor: $task.executor")
"""
# ici ce qui me plait, par défaut du bash
#!/usr/bin/env bash
...
...
@@ -34,6 +34,7 @@ process gzip {
path('*.fastq.gz')
script:
println("[default] fastq: ${reads} ; cpus: ${task.cpus} ; executor: $task.executor")
"""
#!/usr/bin/env bash
gzip -kc ${reads} > ${reads}.gz
...
...
Nextflow/04configuration_environnement/nextflow.config
View file @
9664fa00
params
{
reads
=
'./rawdata/dev/control/SRR*_{1,2}.fastq.gz'
genome
=
'genome.fasta'
outdir
=
'result'
outdir
=
'result/conf_env'
}
timeline
{
enabled
=
true
...
...
@@ -28,7 +27,6 @@ conda {
//
profiles
profiles
{
standard
{
includeConfig
'conf/lipm-smp.config'
...
...
@@ -45,4 +43,26 @@ profiles {
genologin
{
includeConfig
'conf/genotoul-slurm.config'
}
conda
{
process
{
withName
:
'index|mapping'
{
conda
=
'bwa'
}
}
}
singularity
{
process
{
withName
:
'index|mapping'
{
//
container
=
'docker://quay.io/biocontainers/bwa:0.7.17--h5bf99c6_8'
container
=
'img/bwa:0.7.17--h5bf99c6_8'
}
}
singularity
{
enabled
=
true
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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