Commit 458eec97 authored by Gervaise Henry's avatar Gervaise Henry 🤠
Browse files

Set scripts as inputs

parent 028dbf32
Pipeline #5387 passed with stages
in 5 minutes and 42 seconds
......@@ -2,23 +2,20 @@ process {
executor = 'local'
container = 'docker://bicf/bicfbase:1.3'
withLabel:checkDesignFile {
container = 'docker://bicf/python3:1.2'
withName:checkDesignFile {
container = 'docker://bicf/python3:1.3'
}
withLabel:untarBCL {
withName:untarBCL {
}
withLabel:mkfastq {
withName:mkfastq {
container = 'docker://bicf/cellranger3.1.0:1.0'
}
withLabel:countDesign {
withName:countDesign {
}
withLabel:fastqc {
module = ['fastqc/0.11.5', 'parallel']
withName:fastqc {
container = 'docker://bicf/fastqc:1.5'
}
withLabel:versions {
module = ['python/3.6.1-2-anaconda', 'cellranger/3.0.2', 'bcl2fastq/2.19.1', 'fastqc/0.11.5']
}
withLabel:multiqc {
withName:multiqc {
container = 'docker://bicf/multiqc:1.4'
}
}
......
......@@ -8,7 +8,7 @@ main.nf
*
*/
// Define Input variables
// Define input variables
params.name = "run"
params.bcl = "${baseDir}/../test_data/*.tar.gz"
params.designFile = "${baseDir}/../test_data/design.csv"
......@@ -16,7 +16,7 @@ params.outDir = "${baseDir}/output"
params.multiqcConf = "${baseDir}/conf/multiqc_config.yaml"
params.references = "${baseDir}/../docs/references.md"
// Define List of Files
// Define list of files
tarList = Channel
.fromPath( params.bcl )
bclCount = Channel
......@@ -32,12 +32,18 @@ outDir = params.outDir
multiqcConf = params.multiqcConf
references = params.references
// Define script files
check_designScript = Channel.fromPath("$baseDir/scripts/check_design.py")
untarBCLScript = Channel.fromPath("$baseDir/scripts/untarBCL.sh")
countDesignScript = Channel.fromPath("$baseDir/scripts/countDesign.sh")
fastqcScript = Channel.fromPath("$baseDir/scripts/fastqc.sh")
process checkDesignFile {
tag "${name}"
input:
file check_designScript
file designLocation
output:
......@@ -52,7 +58,7 @@ process checkDesignFile {
if [[ "\${noSpaceDesign}" != "${designLocation}" ]]; then
mv "${designLocation}" "\${noSpaceDesign}"
fi
python3 ${baseDir}/scripts/check_design.py -d \${noSpaceDesign}
python3 check_design.py -d \${noSpaceDesign}
"""
}
......@@ -63,6 +69,7 @@ process untarBCL {
tag "${tar}"
input:
file untarBCLScript
file tar from tarList
output:
......@@ -111,6 +118,7 @@ if (bclCount.value == 1) {
publishDir "${outDir}/${task.process}/${name}", mode: 'copy'
input:
file countDesignScript
file fastqs from cellrangerCount.collect()
file design from designCount
......@@ -119,7 +127,7 @@ if (bclCount.value == 1) {
script:
"""
bash ${baseDir}/scripts/countDesign.sh
bash countDesign.sh
"""
}
......@@ -132,6 +140,7 @@ process fastqc {
tag "${bclName}"
input:
file fastqcScript
file fastqPaths
val bclName
......@@ -143,7 +152,7 @@ process fastqc {
hostname
ulimit -a
find *.fastq.gz -exec mv {} ${bclName}.{} \\;
bash ${baseDir}/scripts/fastqc.sh
bash fastqc.sh
"""
}
......
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