Skip to content
Snippets Groups Projects
Commit 0204dcb2 authored by Gervaise Henry's avatar Gervaise Henry :cowboy:
Browse files

Merge branch '13-add.flowcell.to.outputs' into 'develop'

Resolve "Handle multi-flowcells in fastqc and multiqc"

Closes #13

See merge request !18
parents 0889e39c 3f1278c8
Branches
Tags
2 merge requests!19Develop,!18Resolve "Handle multi-flowcells in fastqc and multiqc"
Pipeline #3637 passed with stages
in 1 minute and 28 seconds
......@@ -20,7 +20,7 @@ process {
executor = 'super'
}
withLabel:versions {
module = ['python/3.6.1-2-anaconda']
module = ['python/3.6.1-2-anaconda', 'cellranger/3.0.2', 'bcl2fastq/2.19.1', 'fastqc/0.11.5']
executor = 'local'
}
withLabel:multiqc {
......
......@@ -4,7 +4,7 @@
// Note - $baseDir is the location of this workflow file main.nf
// Define Input variables
params.name = "small"
params.name = "run"
params.bcl = "$baseDir/../test_data/*.tar.gz"
params.designFile = "$baseDir/../test_data/design.csv"
params.outDir = "$baseDir/output"
......@@ -53,7 +53,7 @@ process untarBCL {
output:
file("*") into bclPaths
file("*") into bclPaths mode flatten
script:
......@@ -62,12 +62,13 @@ process untarBCL {
ulimit -a
name=`echo ${tar} | rev | cut -f1 -d '.' | rev`;
if [ "\${name}" == "gz" ];
then tar -xvf ${tar} -I pigz;
else tar -xvf ${tar};
then tar -xvf $tar -I pigz;
else tar -xvf $tar;
fi;
"""
}
process mkfastq {
tag "${bcl.baseName}"
queue '128GB,256GB,256GBv1,384GB'
......@@ -76,46 +77,46 @@ process mkfastq {
input:
val bcl from bclPaths
file designPaths
each bcl from bclPaths.collect()
file design from designPaths
output:
file("**/outs/**/*.fastq.gz") into fastqPaths
file("**/outs/fastq_path/Stats/Stats.json") into bqcPaths
file("version*.txt") into versionPaths_mkfastq
val "${bcl.baseName}" into bclName
script:
"""
hostname
ulimit -a
sh $baseDir/scripts/versions_mkfastq.sh
cellranger mkfastq --id="${bcl.baseName}" --run=$bcl --csv=$designPaths -r \$SLURM_CPUS_ON_NODE -p \$SLURM_CPUS_ON_NODE -w \$SLURM_CPUS_ON_NODE
cellranger mkfastq --id="${bcl.baseName}" --run=$bcl --csv=$design -r \$SLURM_CPUS_ON_NODE -p \$SLURM_CPUS_ON_NODE -w \$SLURM_CPUS_ON_NODE
"""
}
process fastqc {
tag "$name"
tag "$bclName"
queue 'super'
publishDir "$outDir/misc/${task.process}/$name", mode: 'copy', pattern: "{*fastqc.zip}"
publishDir "$outDir/misc/${task.process}/$name/$bclName", mode: 'copy', pattern: "{*fastqc.zip}"
module 'fastqc/0.11.5:parallel'
input:
file fastqPaths
val bclName
output:
file("*fastqc.zip") into fqcPaths
file("version*.txt") into versionPaths_fastqc
script:
"""
hostname
ulimit -a
find *.fastq.gz -exec mv {} $bclName.{} \\;
bash $baseDir/scripts/fastqc.sh
"""
}
......@@ -123,13 +124,10 @@ process fastqc {
process versions {
tag "$name"
publishDir "$outDir/misc/${task.process}/$name", mode: 'copy'
module 'python/3.6.1-2-anaconda'
module 'python/3.6.1-2-anaconda:cellranger/3.0.2:bcl2fastq/2.19.1:fastqc/0.11.5'
input:
file versionPaths_mkfastq
file versionPaths_fastqc
output:
file("*.yaml") into yamlPaths
......@@ -140,21 +138,22 @@ process versions {
hostname
ulimit -a
echo $workflow.nextflow.version > version_nextflow.txt
sh $baseDir/scripts/versions_mkfastq.sh
bash $baseDir/scripts/versions_fastqc.sh
python3 $baseDir/scripts/generate_versions.py -f version_*.txt -o versions
"""
}
process multiqc {
tag "$name"
queue 'super'
publishDir "$outDir/${task.process}/$name", mode: 'copy'
publishDir "$outDir/${task.process}/$name", mode: 'copy', pattern: "{multiqc*}"
module 'multiqc/1.7'
input:
file bqcPaths
file fqcPaths
file bqc name "bqc/?/*" from bqcPaths.collect()
file fqc name "fqc/*" from fqcPaths.collect()
file yamlPaths
output:
......
......@@ -5,4 +5,3 @@ find . -name '*.fastq.gz' | awk '{printf("fastqc \"%s\"\n", $0)}' | parallel -j
#for i in `ls *.fastq.gz`;
#do echo "fastqc ${i}";
#done | parallel -j `grep -c ^processor /proc/cpuinfo` --verbose;
fastqc --version | grep 'FastQC v' | sed -n -e 's/^FastQC v//p' > version_fastqc.txt
#!/bin/bash
fastqc --version | grep 'FastQC v' | sed -n -e 's/^FastQC v//p' > version_fastqc.txt
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