Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
C
cellranger_mkfastq
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
7
Issues
7
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
1
Merge Requests
1
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
BICF
Astrocyte
cellranger_mkfastq
Commits
7bb5c7ab
Commit
7bb5c7ab
authored
Nov 03, 2020
by
Jeremy Mathews
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change main and scripts
parent
49f1f62c
Pipeline
#8282
failed with stages
in 13 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
26 deletions
+56
-26
workflow/main.nf
workflow/main.nf
+45
-24
workflow/scripts/generate_versions.py
workflow/scripts/generate_versions.py
+2
-2
workflow/scripts/versions_spaceranger.sh
workflow/scripts/versions_spaceranger.sh
+9
-0
No files found.
workflow/main.nf
View file @
7bb5c7ab
...
...
@@ -18,6 +18,7 @@ main.nf
// Define input variables
params.name = "run"
params.ranger = "cellranger"
params.bcl = "${baseDir}/../test_data/simple1/*.tar.gz"
params.designFile = "${baseDir}/../test_data/single1/cellranger-tiny-bcl-simple-1_2_0.csv"
params.mask = ""
...
...
@@ -34,6 +35,7 @@ bclCount = Channel
// Define regular variables
pipelineVersion = "3.0.0_indev"
name = params.name
ranger = params.ranger
designLocation = Channel
.fromPath(params.designFile)
.ifEmpty { exit 1, "design file not found: ${params.designFile}" }
...
...
@@ -43,13 +45,13 @@ outDir = params.outDir
// 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")
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")
//versions_pigzScript = Channel.fromPath("$baseDir/scripts/versions_pigz.sh")
versions_cellrangerScript = Channel.fromPath("$baseDir/scripts/versions_cellranger.sh")
versions_spacerangerScript = Channel.fromPath("$baseDir/scripts/versions_spaceranger.sh")
versions_bcl2fastqScript = Channel.fromPath("$baseDir/scripts/versions_bcl2fastq.sh")
versions_fastqcScript = Channel.fromPath("$baseDir/scripts/versions_fastqc.sh")
...
...
@@ -90,6 +92,7 @@ log.info """\
BICF cellranger_mkfastq Pipeline
================================
Run name : ${params.name}
Ranger : ${params.ranger}
bcl : ${params.bcl}
Design File : ${params.designFile}
Output Directory: ${params.outDir}
...
...
@@ -163,7 +166,7 @@ process untarBCL {
}
process mkfastq {
process
cellranger_
mkfastq {
tag "${bcl.simpleName}"
publishDir "${outDir}/${task.process}", mode: 'copy', pattern: "{*/outs/**/*.fastq.gz}"
queue '128GB,256GB,256GBv1,384GB'
...
...
@@ -178,11 +181,14 @@ process mkfastq {
output:
file("fq/${bcl.simpleName}/*.fastq.gz") into fastqPaths
val "${bcl.simpleName}" into bclName
file("**/outs/**/*.fastq.gz") into
cell
rangerCount mode flatten
file("**/outs/**/*.fastq.gz") into rangerCount mode flatten
file("**/outs/fastq_path/Stats/*") into bqcPaths
file("version_
cellranger.txt") into version_cell
ranger
file("version_
ranger.txt") into version_
ranger
file("version_bcl2fastq.txt") into version_bcl2fastq
when:
ranger == "cellranger"
script:
"""
hostname
...
...
@@ -192,32 +198,47 @@ process mkfastq {
mkdir fq
mkdir "fq/${bcl.simpleName}"
find . -name "*.fastq.gz" -exec cp {} fq/${bcl.simpleName}/ \\;
bash versions_cellranger.sh > version_
cell
ranger.txt
bash versions_cellranger.sh > version_ranger.txt
bash versions_bcl2fastq.sh > version_bcl2fastq.txt
"""
}
if (bclCount.value == 1) {
process countDesign {
tag "${name}"
publishDir "${outDir}/${task.process}/${name}", mode: 'copy'
process spaceranger_mkfastq {
tag "${bcl.simpleName}"
publishDir "${outDir}/${task.process}", mode: 'copy', pattern: "{*/outs/**/*.fastq.gz}"
queue '128GB,256GB,256GBv1,384GB'
module 'spaceranger/1.1.0:bcl2fastq/2.19.1'
input:
file versions_spacerangerScript
file versions_bcl2fastqScript
each file(bcl) from bclPaths.collect()
file design from designPaths
input:
file countDesignScript
file fastqs from cellrangerCount.collect()
file design from designCount
output:
file("fq/${bcl.simpleName}/*.fastq.gz") into fastqPaths
val "${bcl.simpleName}" into bclName
file("**/outs/**/*.fastq.gz") into rangerCount mode flatten
file("**/outs/fastq_path/Stats/*") into bqcPaths
file("version_ranger.txt") into version_ranger
file("version_bcl2fastq.txt") into version_bcl2fastq
output
:
file("Cellranger_Count_Design.csv") into CountDesign
when
:
ranger == "spaceranger"
script:
"""
hostname
ulimit -a
bash countDesign.sh
"""
}
script:
"""
hostname
ulimit -u 16384
ulimit -a
spaceranger mkfastq --id=mkfastq_${bcl.simpleName} --run=${bcl} --csv=${design} ${mask}
mkdir fq
mkdir "fq/${bcl.simpleName}"
find . -name "*.fastq.gz" -exec cp {} fq/${bcl.simpleName}/ \\;
bash versions_spaceranger.sh > version_ranger.txt
bash versions_bcl2fastq.sh > version_bcl2fastq.txt
"""
}
...
...
@@ -249,7 +270,7 @@ process fastqc {
process versions {
tag "${name}"
module 'python/3.6.1-2-anaconda:
cellranger/3.1.0:bcl2fastq/2.19.1:fastqc/0.11.5:
pandoc/2.7'
module 'python/3.6.1-2-anaconda:pandoc/2.7'
input:
file versionsScript
...
...
@@ -258,7 +279,7 @@ process versions {
file version_nextflow
file version_python
//file version_pigz
file version_
cell
ranger
file version_ranger
file version_bcl2fastq
file version_fastqc
file references
...
...
workflow/scripts/generate_versions.py
View file @
7bb5c7ab
...
...
@@ -30,7 +30,7 @@ SOFTWARE_REGEX = {
'Nextflow'
:
[
'version_nextflow.txt'
,
r
"(\S+)"
],
'python'
:
[
'version_python.txt'
,
r
"(\S+)"
],
#'pigz': ['version_pigz.txt', r"(\S+)"],
'
cellranger'
:
[
'version_cell
ranger.txt'
,
r
"(\S+)"
],
'
10x-ranger'
:
[
'version_
ranger.txt'
,
r
"(\S+)"
],
'bcl2fastq'
:
[
'version_bcl2fastq.txt'
,
r
"(\S+)"
],
'fastqc'
:
[
'version_fastqc.txt'
,
r
"(\S+)"
],
}
...
...
@@ -82,7 +82,7 @@ def main():
results
[
'Nextflow'
]
=
'<span style="color:#999999;
\"
>N/A</span>'
results
[
'python'
]
=
'<span style="color:#999999;
\"
>N/A</span>'
#results['pigz'] = '<span style="color:#999999;\">N/A</span>'
results
[
'
cell
ranger'
]
=
'<span style="color:#999999;
\"
>N/A</span>'
results
[
'
10x-
ranger'
]
=
'<span style="color:#999999;
\"
>N/A</span>'
results
[
'bcl2fastq'
]
=
'<span style="color:#999999;
\"
>N/A</span>'
results
[
'fastqc'
]
=
'<span style="color:#999999;
\"
>N/A</span>'
...
...
workflow/scripts/
countDesign
.sh
→
workflow/scripts/
versions_spaceranger
.sh
View file @
7bb5c7ab
#!/bin/bash
#
countDesign
.sh
#
versions_spaceranger
.sh
#*
#* --------------------------------------------------------------------------
#* Licensed under MIT (https://git.biohpc.swmed.edu/BICF/Astrocyte/cellranger_mkfastq/blob/develop/LICENSE)
#* --------------------------------------------------------------------------
#*
fastqs
=(
$(
ls
*
.fastq.gz
)
)
design
=
$(
ls
*
.csv
)
sample
=
$(
cat
${
design
}
|
tail
-n
+2 |
cut
-d
','
-f2
)
echo
"Sample,fastq_R1,fastq_R2"
>
Cellranger_Count_Design.csv
;
for
i
in
${
sample
}
;
do
for
j
in
$(
seq
1
${#
fastqs
[@]
}
)
;
do
if
[[
${
fastqs
[
${
j
}
-1]
}
==
*
_I
*
]]
;
then
continue
elif
[[
${
fastqs
[
${
j
}
-1]
}
==
*${
i
}*
&&
${
fastqs
[
${
j
}
]
}
==
*${
i
}*
]]
;
then
echo
"
${
i
}
,
${
fastqs
[
${
j
}
-1]
}
,
${
fastqs
[
${
j
}
]
}
"
>>
Cellranger_Count_Design.csv
fi
done
done
spaceranger mkfastq
--version
|
grep
'spaceranger mkfastq '
|
sed
's/.*(\(.*\))/\1/'
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment