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

Make script files inputs

parent bca7b52f
1 merge request!73Develop
Pipeline #7386 failed with stages
in 12 seconds
......@@ -79,7 +79,14 @@ chemistryParam = params.chemistryParam
version = params.version
outDir = params.outDir
// Define constant variables
// Define script files
check_designScript = Channel.fromPath("$baseDir/scripts/check_design.py")
filename_checkScript = Channel.fromPath("$baseDir/scripts/filename_check.sh")
versionsScript = Channel.fromPath("$baseDir/scripts/generate_versions.py")
referencesScript = Channel.fromPath("$baseDir/scripts/generate_references.py")
versions_pythonScript = Channel.fromPath("$baseDir/scripts/versions_python.sh")
// Define report files
multiqcConf = "${baseDir}/conf/multiqc_config.yaml"
references = "${baseDir}/../docs/references.md"
......@@ -119,6 +126,7 @@ process checkDesignFile {
input:
file designLocation
file fastqList
file check_designScript
output:
file("design.checked.csv") into designPaths
......@@ -131,7 +139,7 @@ process checkDesignFile {
if [[ "\${noSpaceDesign}" != "${designLocation}" ]]; then
mv "${designLocation}" "\${noSpaceDesign}"
fi
python3 ${baseDir}/scripts/check_design.py -d \${noSpaceDesign} -f ${fastqList}
python3 check_design.py -d \${noSpaceDesign} -f ${fastqList}
"""
}
......@@ -179,6 +187,7 @@ process count211 {
expectCells211
forceCells211
chemistryParam211
file filename_checkScript
output:
file("**/outs/**") into outPaths211
......@@ -193,7 +202,7 @@ process count211 {
hostname
ulimit -u 16384
ulimit -a
bash ${baseDir}/scripts/filename_check.sh -r ${ref}
bash filename_check.sh -r ${ref}
cellranger count --id=${sample} --transcriptome=./${ref} --fastqs=. --sample=${sample} --expect-cells=${expectCells211} --chemistry=${chemistryParam211}
sed -E 's/("([^"]*)")?(,|\$)/\\2\t/g' ${sample}/outs/metrics_summary.csv | tr -d "," | sed "s/^/${sample}\t/" > ${sample}_metrics_summary.tsv
"""
......@@ -203,7 +212,7 @@ process count211 {
hostname
ulimit -u 16384
ulimit -a
bash ${baseDir}/scripts/filename_check.sh -r ${ref}
bash filename_check.sh -r ${ref}
cellranger count --id=${sample} --transcriptome=./${ref} --fastqs=. --sample=${sample} --force-cells=${forceCells211} --chemistry=${chemistryParam211}
sed -E 's/("([^"]*)")?(,|\$)/\\2\t/g' ${sample}/outs/metrics_summary.csv | tr -d "," | sed "s/^/${sample}\t/" > ${sample}_metrics_summary.tsv
"""
......@@ -226,6 +235,7 @@ process count302 {
expectCells302
forceCells302
chemistryParam302
file filename_checkScript
output:
file("**/outs/**") into outPaths302
......@@ -240,7 +250,7 @@ process count302 {
hostname
ulimit -u 16384
ulimit -a
bash ${baseDir}/scripts/filename_check.sh -r ${ref}
bash filename_check.sh -r ${ref}
cellranger count --id=${sample} --transcriptome=./${ref} --fastqs=. --sample=${sample} --expect-cells=${expectCells302} --chemistry=${chemistryParam302}
sed -E 's/("([^"]*)")?(,|\$)/\\2\t/g' ${sample}/outs/metrics_summary.csv | tr -d "," | sed "s/^/${sample}\t/" > ${sample}_metrics_summary.tsv
"""
......@@ -250,7 +260,7 @@ process count302 {
hostname
ulimit -u 16384
ulimit -a
bash ${baseDir}/scripts/filename_check.sh -r ${ref}
bash filename_check.sh -r ${ref}
cellranger count --id=${sample} --transcriptome=./${ref} --fastqs=. --sample=${sample} --force-cells=${forceCells302} --chemistry=${chemistryParam302}
sed -E 's/("([^"]*)")?(,|\$)/\\2\t/g' ${sample}/outs/metrics_summary.csv | tr -d "," | sed "s/^/${sample}\t/" > ${sample}_metrics_summary.tsv
"""
......@@ -272,6 +282,7 @@ process count310 {
expectCells310
forceCells310
chemistryParam310
file filename_checkScript
output:
file("**/outs/**") into outPaths310
......@@ -286,7 +297,7 @@ process count310 {
hostname
ulimit -u 16384
ulimit -a
bash ${baseDir}/scripts/filename_check.sh -r ${ref}
bash filename_check.sh -r ${ref}
cellranger count --id=${sample} --transcriptome=./${ref} --fastqs=. --sample=${sample} --expect-cells=${expectCells310} --chemistry=${chemistryParam310}
sed -E 's/("([^"]*)")?(,|\$)/\\2\t/g' ${sample}/outs/metrics_summary.csv | tr -d "," | sed "s/^/${sample}\t/" > ${sample}_metrics_summary.tsv
"""
......@@ -296,7 +307,7 @@ process count310 {
hostname
ulimit -u 16384
ulimit -a
bash ${baseDir}/scripts/filename_check.sh -r ${ref}
bash filename_check.sh -r ${ref}
cellranger count --id=${sample} --transcriptome=./${ref} --fastqs=. --sample=${sample} --force-cells=${forceCells310} --chemistry=${chemistryParam310}
sed -E 's/("([^"]*)")?(,|\$)/\\2\t/g' ${sample}/outs/metrics_summary.csv | tr -d "," | sed "s/^/${sample}\t/" > ${sample}_metrics_summary.tsv
"""
......@@ -311,6 +322,8 @@ process versions {
input:
file versions_pythonScript
file referencesScript
file versions_pythonScript
output:
file("*.yaml") into yamlPaths
......@@ -324,8 +337,8 @@ process versions {
echo "${pipelineVersion}" > version_pipeline.txt
echo "${version}" > version_cellranger.txt
bash versions_python.sh > version_python.txt
python3 "${baseDir}/scripts/generate_versions.py" -f version_*.txt -o versions
python3 "${baseDir}/scripts/generate_references.py" -r "${references}" -o references
python3 generate_versions.py -f version_*.txt -o versions
python3 generate_references.py -r "${references}" -o references
"""
}
......
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