Commit 9664fa00 authored by Ludovic Legrand's avatar Ludovic Legrand
Browse files

amelioration de 04config

parent 538a6002
Pipeline #42631 passed with stage
in 1 minute and 46 seconds
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.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)
}
......@@ -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
......
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
}
}
}
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