Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cellranger cwl #2

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions sub_workflows/cellranger_count_aggr.cwl
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/usr/bin/env cwl-runner

cwlVersion: v1.0
class: Workflow
label: "Cellranger count and aggr subworkflow."

requirements:
- class: ScatterFeatureRequirement

inputs:
fastq_directory:
type: Directory[]
chemistry:
type: string?
reference:
type: Directory
sample_name:
type: string[]

steps:
count:
run: /gscuser/matthewmosior/Software/cellranger_cwl/cellranger_count/tool/cellranger_count.cwl
scatter: [fastq_directory, sample_name]
scatterMethod: dotproduct
in:
chemistry: chemistry
fastq_directory: fastq_directory
reference: reference
sample_name: sample_name
out: [out_dir, molecule_info_file]
prepare_aggr_csv:
run: /gscuser/matthewmosior/Software/cellranger_cwl/prepare_aggr_csv/tool/prepare_aggr_csv.cwl
in:
out_dir: count/out_dir
molecule_h5: count/molecule_info_file
out:
[aggr_csv_file]
aggr:
run: /gscuser/matthewmosior/Software/cellranger_cwl/cellranger_aggr/tool/cellranger_aggr.cwl
in:
csv_file: prepare_aggr_csv/aggr_csv_file
out:
[aggr_out_dir]

outputs:
count_out_dir:
type: Directory[]
outputSource: count/out_dir
count_molecule_file:
type: File[]
outputSource: count/molecule_info_file
aggr_out_dir:
type: Directory
outputSource: aggr/aggr_out_dir
31 changes: 31 additions & 0 deletions tools/cellranger_aggr.cwl
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env cwl-runner

cwlVersion: v1.0
class: CommandLineTool
label: "Run Cellranger Aggregate (aggr)."

baseCommand: ["/opt/cellranger-3.0.1/cellranger","aggr"]
arguments: ["--id=test_AGGR","--localcores=$(runtime.cores)", "--localmem=$(runtime.ram/1000)","--normalize=mapped"]

requirements:
- class: InlineJavascriptRequirement
- class: DockerRequirement
dockerPull: "registry.gsc.wustl.edu/mgi/cellranger:3.0.1"
- class: ResourceRequirement
ramMin: 64000
coresMin: 8

inputs:
csv_file:
type: File
inputBinding:
prefix: --csv=
position: 1
separate: false
doc: "CSV file containing samples to be aggregated."

outputs:
aggr_out_dir:
type: Directory
outputBinding:
glob: "/gscuser/matthewmosior/Software/cellranger_cwl/cellranger_aggr/test_AGGR"
57 changes: 57 additions & 0 deletions tools/cellranger_count.cwl
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#!/usr/bin/env cwl-runner

cwlVersion: v1.0
class: CommandLineTool
label: "Run Cell Ranger Count"

baseCommand: ["/opt/cellranger-3.0.1/cellranger", "count"]
arguments: ["--id=GEX_example", "--localcores=$(runtime.cores)", "--localmem=$(runtime.ram/1000)"]

requirements:
- class: InlineJavascriptRequirement
- class: DockerRequirement
dockerPull: "registry.gsc.wustl.edu/mgi/cellranger:3.0.1"
- class: ResourceRequirement
ramMin: 56000
coresMin: 8

inputs:
chemistry:
type: string?
inputBinding:
prefix: --chemistry=
position: 1
separate: false
default: "auto"
doc: "Assay configuration used, default 'auto' should usually work without issue"
fastq_directory:
type: Directory
inputBinding:
prefix: --fastqs=
position: 2
separate: false
doc: "Array of directories containing fastq files"
reference:
type: Directory
inputBinding:
prefix: --transcriptome=
position: 3
separate: false
doc: "Transcriptome reference compatible with input species and Cell Ranger"
sample_name:
type: string
inputBinding:
prefix: --sample=
position: 4
separate: false
doc: "Sample name, must be same as name specified in sample sheet in previous mkfastq step"

outputs:
out_dir:
type: Directory
outputBinding:
glob: "$(inputs.sample_name)/outs/"
molecule_info_file:
type: File
outputBinding:
glob: "$(inputs.sample_name)/outs/molecule_info.h5"
26 changes: 26 additions & 0 deletions tools/prepare_aggr_csv.cwl
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env cwl-runner

cwlVersion: v1.0
class: CommandLineTool
label: "Prepare csv file for cellranger aggr."
baseCommand: ["/bin/bash","/gscuser/matthewmosior/Software/cellranger_cwl/prepare_aggr_csv/prepare_aggr_csv.sh"]
requirements:
- class: InlineJavascriptRequirement
- class: ResourceRequirement
ramMin: 32000
coresMin: 12

inputs:
out_dir:
type: Directory[]
inputBinding:
position: 1
molecule_h5:
type: File[]
inputBinding:
position: 2
outputs:
aggr_csv_file:
type: File
outputBinding:
glob: "$(inputs.out_dir)_aggr.csv"