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

Implement VM cellranger version handling for #1

parent 3806d914
2 merge requests!16Develop,!2Resolve "Add cellranger v3.0.1"
Pipeline #2994 passed with stage
in 16 seconds
......@@ -41,6 +41,7 @@ documentation_files:
workflow_modules:
- 'python/3.6.1-2-anaconda'
- 'cellranger/2.1.1'
- 'cellranger/3.0.1'
- 'bcl2fastq/2.17.1.14'
# A list of parameters used by the workflow, defining how to present them,
......@@ -122,6 +123,16 @@ workflow_parameters:
description: |
Force pipeline to use this number of cells, bypassing the cell detection algorithm. Use this if the number of cells estimated by Cell Ranger is not consistent with the barcode rank plot. A value of 0 ignores this option. Any value other than 0 overrides expect-cells.
- id: version
type: select
default: 3.0.1
choices:
- [ 3, '3.0.1']
- [ 2, '2.0.1']
required: true
description: |
10x cellranger version.
# -----------------------------------------------------------------------------
# SHINY APP CONFIGURATION
# -----------------------------------------------------------------------------
......
Sample,fastq_R1,fastq_R2
D17PrPzF_BE,/work/urology/ghenry/Grimoire/Astrocyte/cellranger_count/test_data/D17PrPzF_BE_S1_L001_R1_001.fastq.gz,/work/urology/ghenry/Grimoire/Astrocyte/cellranger_count/test_data/D17PrPzF_BE_S1_L001_R2_001.fastq.gz
D17PrPzF_BE,/work/urology/ghenry/Grimoire/Astrocyte/cellranger_count/test_data/D17PrPzF_BE_S1_L002_R1_001.fastq.gz,/work/urology/ghenry/Grimoire/Astrocyte/cellranger_count/test_data/D17PrPzF_BE_S1_L002_R2_001.fastq.gz
D17PrPzF_LE,/work/urology/ghenry/Grimoire/Astrocyte/cellranger_count/test_data/D17PrPzF_LE_S3_L001_R1_001.fastq.gz,/work/urology/ghenry/Grimoire/Astrocyte/cellranger_count/test_data/D17PrPzF_LE_S3_L001_R2_001.fastq.gz
Sample,fastq_R1,fastq_R2
D17PrPzF_BE,D17PrPzF_BE_S1_L001_R1_001.fastq.gz,D17PrPzF_BE_S1_L001_R2_001.fastq.gz
D17PrPzF_BE,D17PrPzF_BE_S1_L002_R1_001.fastq.gz,D17PrPzF_BE_S1_L002_R2_001.fastq.gz
D17PrPzF_LE,D17PrPzF_LE_S3_L001_R1_001.fastq.gz,D17PrPzF_LE_S3_L001_R2_001.fastq.gz
......@@ -7,9 +7,12 @@ process {
module = ['python/3.6.1-2-anaconda']
executor = 'local'
}
$count {
$count2 {
module = ['cellranger/2.1.1']
}
$count3 {
module = ['cellranger/3.0.1']
}
}
trace {
......
......@@ -41,7 +41,6 @@ process checkDesignFile {
script:
"""
module load python/3.6.1-2-anaconda
python3 $baseDir/scripts/check_design.py -d $designLocation -f $fastqList
"""
}
......@@ -53,33 +52,78 @@ samples = designPaths
.groupTuple()
//.subscribe { println it }
// Duplicate variables
samples.into {
samples2
samples3
}
refLocation.into {
refLocation2
refLocation3
}
expectCells2 = expectCells
expectCells3 = expectCells
forceCells2 = forceCells
forceCells3 = forceCells
process count2 {
tag "count2-$sample"
publishDir "$baseDir/output", mode: 'copy'
input:
set sample, file("${sample}_S1_L00?_R1_001.fastq.gz"), file("${sample}_S1_L00?_R2_001.fastq.gz") from samples2
file ref from refLocation2.first()
expectCells2
forceCells2
output:
file("**/outs/**") into outPaths2
process count {
tag "$sample"
when:
version == 2
script:
if (forceCells2 == 0){
"""
cellranger count --id="$sample" --transcriptome="./$ref" --fastqs=. --sample="$sample" --expect-cells=$expectCells2
"""
} else {
"""
cellranger count --id="$sample" --transcriptome="./$ref" --fastqs=. --sample="$sample" --force-cells=$forceCells2
"""
}
}
process count3 {
tag "count3-$sample"
publishDir "$baseDir/output", mode: 'copy'
input:
set sample, file("${sample}_S1_L00?_R1_001.fastq.gz"), file("${sample}_S1_L00?_R2_001.fastq.gz") from samples
file ref from refLocation.first()
expectCells
forceCells
set sample, file("${sample}_S1_L00?_R1_001.fastq.gz"), file("${sample}_S1_L00?_R2_001.fastq.gz") from samples3
file ref from refLocation3.first()
expectCells3
forceCells3
output:
file("**/outs/**") into outPaths
file("**/outs/**") into outPaths3
when:
version == 3
script:
if (forceCells == 0){
"""
module load cellranger/2.1.1
cellranger count --id="$sample" --transcriptome="./$ref" --fastqs=. --sample="$sample" --expect-cells=$expectCells
"""
if (forceCells3 == 0){
"""
cellranger count --id="$sample" --transcriptome="./$ref" --fastqs=. --sample="$sample" --expect-cells=$expectCells3
"""
} else {
"""
module load cellranger/2.1.1
cellranger count --id="$sample" --transcriptome="./$ref" --fastqs=. --sample="$sample" --force-cells=$forceCells
"""
"""
cellranger count --id="$sample" --transcriptome="./$ref" --fastqs=. --sample="$sample" --force-cells=$forceCells3
"""
}
}
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