Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cellranger_count
Manage
Activity
Members
Labels
Plan
Issues
11
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
BICF
Astrocyte
cellranger_count
Commits
dfbcb8c5
Commit
dfbcb8c5
authored
5 years ago
by
Gervaise Henry
Browse files
Options
Downloads
Patches
Plain Diff
Bring params up to standards
parent
aa1769fc
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!63
Develop
,
!61
Resolve "Update params to current standards"
Pipeline
#6543
failed with stages
in 10 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
workflow/main.nf
+46
-46
46 additions, 46 deletions
workflow/main.nf
with
46 additions
and
46 deletions
workflow/main.nf
+
46
−
46
View file @
dfbcb8c5
...
...
@@ -20,15 +20,33 @@ params.kitVersion = '3GEXv3'
params.version = '3.1.0'
params.astrocyte = false
params.outDir = "${baseDir}/output"
params.multiqcConf = "${baseDir}/conf/multiqc_config.yaml"
params.references = "${baseDir}/../docs/references.md"
// Variable error test
if (params.kitVersion == "3GEXv3" && params.version == '2.1.1') {
print("Cellranger Version 2.1.1 requires kitVersion 2")
System.exit(32)
}
// Assign variables if astrocyte
// Define variables from input
name = params.name
designLocation = Channel
.fromPath(params.designFile)
.ifEmpty { exit 1, "design file not found: ${params.designFile}" }
fastqList = Channel
.fromPath(params.fastq)
.flatten()
.map { file -> [ file.getFileName().toString(), file.toString() ].join("\t") }
.collectFile(name: 'fileList.tsv', newLine: true)
refLocation = Channel
.fromPath(params.genomeLocationFull)
.ifEmpty { exit 1, "referene not found: ${params.genome}" }
expectCells = params.expectCells
forceCells = params.forceCells
chemistryParam = params.chemistryParam
version = params.version
outDir = params.outDir
// Define variables if astrocyte (or from config)
if (params.astrocyte) {
print("Running under astrocyte")
params.genomeLocation = '/project/apps_database/cellranger/refdata-cellranger-'
...
...
@@ -49,30 +67,14 @@ if (params.astrocyte) {
}
params.genomeLocationFull = params.genomeLocation+params.genome
// Define regular variables
name = params.name
designLocation = Channel
.fromPath(params.designFile)
.ifEmpty { exit 1, "design file not found: ${params.designFile}" }
fastqList = Channel
.fromPath(params.fastq)
.flatten()
.map { file -> [ file.getFileName().toString(), file.toString() ].join("\t") }
.collectFile(name: 'fileList.tsv', newLine: true)
refLocation = Channel
.fromPath(params.genomeLocationFull)
.ifEmpty { exit 1, "referene not found: ${params.genome}" }
expectCells = params.expectCells
forceCells = params.forceCells
chemistryParam = params.chemistryParam
version = params.version
outDir = params.outDir
multiqcConf = params.multiqcConf
references = params.references
// Define constant variables
multiqcConf = "${baseDir}/conf/multiqc_config.yaml"
references = "${baseDir}/../docs/references.md"
/*
* checkDesignFile: check design file for errors
*/
process checkDesignFile {
tag "${name}"
module 'python/3.6.1-2-anaconda'
...
...
@@ -93,7 +95,6 @@ process checkDesignFile {
fi
python3 ${baseDir}/scripts/check_design.py -d \${noSpaceDesign} -f ${fastqList}
"""
}
...
...
@@ -104,7 +105,6 @@ samples = designPaths
.groupTuple()
//.subscribe { println it }
// Duplicate variables
samples.into {
samples211
...
...
@@ -130,9 +130,10 @@ chemistryParam301 = chemistryParam
chemistryParam302 = chemistryParam
chemistryParam310 = chemistryParam
/*
* count211: run cellranger count version 2.1.1
*/
process count211 {
queue '128GB,256GB,256GBv1,384GB'
tag "${sample}"
publishDir "${outDir}/${task.process}", mode: 'copy'
...
...
@@ -170,12 +171,12 @@ process count211 {
sed -E 's/("([^"]*)")?(,|\$)/\\2\t/g' ${sample}/outs/metrics_summary.csv | tr -d "," | sed "s/^/${sample}\t/" > ${sample}_metrics_summary.tsv
"""
}
}
/*
* count211: run cellranger count version 3.0.1
*/
process count301 {
queue '128GB,256GB,256GBv1,384GB'
tag "${sample}"
publishDir "${outDir}/${task.process}", mode: 'copy'
...
...
@@ -214,12 +215,12 @@ process count301 {
sed -E 's/("([^"]*)")?(,|\$)/\\2\t/g' ${sample}/outs/metrics_summary.csv | tr -d "," | sed "s/^/${sample}\t/" > ${sample}_metrics_summary.tsv
"""
}
}
/*
* count211: run cellranger count version 3.0.2
*/
process count302 {
queue '128GB,256GB,256GBv1,384GB'
tag "${sample}"
publishDir "${outDir}/${task.process}", mode: 'copy'
...
...
@@ -260,12 +261,12 @@ process count302 {
sed -E 's/("([^"]*)")?(,|\$)/\\2\t/g' ${sample}/outs/metrics_summary.csv | tr -d "," | sed "s/^/${sample}\t/" > ${sample}_metrics_summary.tsv
"""
}
}
/*
* count211: run cellranger count version 3.1.0
*/
process count310 {
queue '128GB,256GB,256GBv1,384GB'
tag "${sample}"
publishDir "${outDir}/${task.process}", mode: 'copy'
...
...
@@ -305,12 +306,12 @@ process count310 {
sed -E 's/("([^"]*)")?(,|\$)/\\2\t/g' ${sample}/outs/metrics_summary.csv | tr -d "," | sed "s/^/${sample}\t/" > ${sample}_metrics_summary.tsv
"""
}
}
/*
* versions: collect too versions into a single yml
*/
process versions {
tag "${name}"
module 'python/3.6.1-2-anaconda:pandoc/2.7:multiqc/1.7'
...
...
@@ -329,15 +330,15 @@ process versions {
python3 "${baseDir}/scripts/generate_versions.py" -f version_*.txt -o versions
python3 "${baseDir}/scripts/generate_references.py" -r "${references}" -o references
"""
}
// Collect all metrics summaries reguardless of cellranger version
metricsSummary = metricsSummary211.mix(metricsSummary301, metricsSummary302, metricsSummary310)
/*
* multiqc: create multiqc report
*/
process multiqc {
tag "${name}"
publishDir "${outDir}/${task.process}/${name}", mode: 'copy'
module 'multiqc/1.7'
...
...
@@ -357,5 +358,4 @@ process multiqc {
sed -i '1s/^.*\tE/Sample\tE/' metrics_summary_mqc.tsv
multiqc -c ${multiqcConf} .
"""
}
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment