-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbulk-pipeline.cwl
87 lines (78 loc) · 2.1 KB
/
bulk-pipeline.cwl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#!/usr/bin/env cwl-runner
class: Workflow
cwlVersion: v1.2
label: bulk scRNA-seq pipeline using Salmon
requirements:
ScatterFeatureRequirement: {}
SubworkflowFeatureRequirement: {}
MultipleInputFeatureRequirement: {}
InlineJavascriptRequirement: {}
inputs:
fastq_dir:
label: "Directory containing FASTQ files"
type: Directory
threads:
label: "Number of threads for Salmon"
type: int
default: 1
organism:
type: string?
outputs:
fastqc_dir:
outputSource: fastqc/fastqc_dir
type: Directory
label: "Directory of FastQC output files, mirroring input directory structure"
salmon_output:
outputSource: salmon-bulk/output_dir
type: Directory
label: "Full output of `salmon quant`"
expression_matrix:
outputSource: make_expression_matrix/expression_matrix
type: File
label: "A hd5 file containing transcript by sample matrices of TPM and number of reads"
steps:
- id: fastqc
in:
- id: fastq_dir
source: fastq_dir
- id: threads
source: threads
out:
- fastqc_dir
run: steps/fastqc.cwl
label: "Run fastqc on all fastq files in fastq directory"
- id: salmon-bulk
in:
- id: fastq_dir
source: fastq_dir
- id: threads
source: threads
- id: organism
source: organism
out:
- output_dir
run: steps/bulk-salmon.cwl
when: $(inputs.organism == 'human')
label: "Salmon quant 1.0.0, with index from GRCh38 transcriptome"
- id: salmon-bulk-mouse
in:
- id: fastq_dir
source: fastq_dir
- id: threads
source: threads
- id: organism
source: organism
out:
- output_dir
run: steps/bulk-salmon-mouse.cwl
when: $(inputs.organism == 'mouse')
label: "Salmon quant 1.0.0, with index from GRCm39 transcriptome"
- id: make_expression_matrix
in:
- id: quant_dir
source: [salmon-bulk/output_dir, salmon-bulk-mouse/output_dir]
pickValue: first_non_null
out:
- expression_matrix
run: steps/expression-matrix.cwl
label: "Make expression matrix from quant vectors"