Skip to content

Commit cb8fdd0

Browse files
Add clean version of DESeq2 LRT workflows
1 parent 24584c7 commit cb8fdd0

19 files changed

+2824
-2223
lines changed

tools/deseq-lrt-step-1.cwl

Lines changed: 86 additions & 231 deletions
Large diffs are not rendered by default.

tools/deseq-lrt-step-2-input.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

tools/deseq-lrt-step-2.cwl

Lines changed: 73 additions & 225 deletions
Original file line numberDiff line numberDiff line change
@@ -1,288 +1,136 @@
11
cwlVersion: v1.0
22
class: CommandLineTool
33

4-
requirements:
5-
- class: InlineJavascriptRequirement
6-
74
hints:
85
- class: DockerRequirement
9-
dockerPull: "biowardrobe2/scidap-deseq:v0.0.72"
6+
dockerPull: biowardrobe2/diff-tools:v0.0.1
107

118
inputs:
129

13-
dsq_obj_data:
14-
type: File?
15-
inputBinding:
16-
prefix: "--dsq_obj_data"
17-
doc: "RDS file containing the contrasts list from step 1"
18-
19-
contrasts_table:
20-
type: File?
10+
query_rds:
11+
type: File
2112
inputBinding:
22-
prefix: "--contrast_df"
23-
doc: "TSV file containing contrasts data"
13+
prefix: "--query"
2414

25-
batchcorrection:
15+
target_contrasts:
2616
type:
27-
- "null"
28-
- type: enum
29-
symbols:
30-
- "none"
31-
- "combatseq"
32-
- "model"
33-
inputBinding:
34-
prefix: "--batchcorrection"
35-
default: "none"
36-
doc: "Batch correction method. Default: none"
37-
38-
contrast_indices:
39-
type: string
17+
- string
18+
- string[]
4019
inputBinding:
41-
prefix: "--contrast_indices"
42-
doc: "Comma-separated list of integers representing contrast indices (e.g., 1,2,3)"
20+
prefix: "--target"
4321

44-
fdr_cutoff:
22+
padj_threshold:
4523
type: float?
4624
inputBinding:
47-
prefix: "--fdr"
48-
default: 0.1
49-
doc: |
50-
In the exploratory visualization part of the analysis, output only features with adjusted p-value (FDR) not bigger than this value.
51-
Default: 0.1.
25+
prefix: "--padj"
5226

53-
lfcthreshold:
27+
logfc_threshold:
5428
type: float?
5529
inputBinding:
56-
prefix: "--lfcthreshold"
57-
default: 0.59
58-
doc: |
59-
Log2 fold change threshold for determining significant differential expression.
60-
Genes with absolute log2 fold change greater than this threshold will be considered.
61-
Default: 0.59 (about 1.5 fold change)
30+
prefix: "--logfc"
6231

63-
regulation:
32+
alternative_hypothesis:
6433
type:
65-
- "null"
66-
- type: enum
67-
symbols:
68-
- "both"
69-
- "up"
70-
- "down"
71-
inputBinding:
72-
prefix: "--regulation"
73-
default: "both"
74-
doc: |
75-
Direction of differential expression comparison. β is the log2 fold change.
76-
'both' for both up and downregulated genes (|β| > lfcThreshold);
77-
'up' for upregulated genes (β > lfcThreshold);
78-
'down' for downregulated genes (β < -lfcThreshold).
79-
Default: both
80-
81-
output_prefix:
82-
type: string?
83-
inputBinding:
84-
prefix: "--output"
85-
default: "deseq-lrt-step-2"
86-
doc: "Output prefix"
87-
88-
use_lfc_thresh:
89-
type: boolean
34+
- "null"
35+
- type: enum
36+
symbols:
37+
- "greater"
38+
- "less"
39+
- "lessAbs"
40+
- "greaterAbs"
9041
inputBinding:
91-
prefix: "--use_lfc_thresh"
92-
valueFrom: "$(self ? 'TRUE' : 'FALSE')"
93-
default: false
94-
doc: "Use lfcthreshold as the null hypothesis value in the results function call. Default: TRUE"
42+
prefix: "--alternative"
9543

9644
cluster_method:
9745
type:
98-
- "null"
99-
- type: enum
100-
symbols:
101-
- "row"
102-
- "column"
103-
- "both"
104-
- "none"
46+
- "null"
47+
- type: enum
48+
symbols:
49+
- "row"
50+
- "column"
51+
- "both"
10552
inputBinding:
10653
prefix: "--cluster"
107-
default: "none"
108-
doc: |
109-
Hopach clustering method to be run on normalized read counts for the
110-
exploratory visualization part of the analysis. Default: do not run
111-
clustering
11254

113-
row_distance:
55+
cluster_row_distance:
11456
type:
115-
- "null"
116-
- type: enum
117-
symbols:
118-
- "cosangle"
119-
- "abscosangle"
120-
- "euclid"
121-
- "cor"
122-
- "abscor"
57+
- "null"
58+
- type: enum
59+
symbols:
60+
- "cosangle"
61+
- "abscosangle"
62+
- "euclid"
63+
- "abseuclid"
64+
- "cor"
65+
- "abscor"
12366
inputBinding:
12467
prefix: "--rowdist"
125-
doc: |
126-
Distance metric for HOPACH row clustering. Ignored if --cluster is not
127-
provided. Default: cosangle
12868

129-
column_distance:
69+
cluster_col_distance:
13070
type:
131-
- "null"
132-
- type: enum
133-
symbols:
134-
- "cosangle"
135-
- "abscosangle"
136-
- "euclid"
137-
- "cor"
138-
- "abscor"
71+
- "null"
72+
- type: enum
73+
symbols:
74+
- "cosangle"
75+
- "abscosangle"
76+
- "euclid"
77+
- "abseuclid"
78+
- "cor"
79+
- "abscor"
13980
inputBinding:
14081
prefix: "--columndist"
141-
doc: |
142-
Distance metric for HOPACH column clustering. Ignored if --cluster is not
143-
provided. Default: euclid
14482

145-
scaling_type:
146-
type:
147-
- "null"
148-
- type: enum
149-
symbols:
150-
- "minmax"
151-
- "zscore"
83+
cluster_max_depth:
84+
type: int?
15285
inputBinding:
153-
prefix: "--scaling_type"
154-
default: "zscore"
155-
doc: |
156-
Specifies the type of scaling to be applied to the expression data.
157-
'minmax' applies Min-Max scaling, normalizing values to a range of [-2, 2].
158-
'zscore' applies Z-score standardization, centering data to mean = 0 and standard deviation = 1.
159-
Default: none (no scaling applied).
160-
**Note:** If 'minmax' or 'zscore' is selected, all genes/features will be scaled accordingly before further analysis.
86+
prefix: "--depth"
16187

162-
k_hopach:
88+
cluster_max_branches:
16389
type: int?
16490
inputBinding:
165-
prefix: "--k"
166-
default: 3
167-
doc: "Number of levels (depth) for Hopach clustering: min - 1, max - 15. Default: 3."
91+
prefix: "--branches"
16892

169-
kmax_hopach:
170-
type: int?
93+
output_prefix:
94+
type: string?
17195
inputBinding:
172-
prefix: "--kmax"
173-
default: 5
174-
doc: "Maximum number of clusters at each level for Hopach clustering: min - 2, max - 9. Default: 5."
96+
prefix: "--output"
17597

17698
threads:
17799
type: int?
178100
inputBinding:
179-
prefix: "--threads"
180-
default: 1
181-
doc: "Number of threads"
182-
183-
test_mode:
184-
type: boolean
185-
inputBinding:
186-
prefix: "--test_mode"
187-
valueFrom: "$(self ? 'TRUE' : 'FALSE')"
188-
default: false
189-
doc: "Run for test, only first 100 rows"
101+
prefix: "--cpus"
190102

191103
outputs:
192104

193-
diff_expr_files:
194-
type: File[]
105+
vlcn_png:
106+
type:
107+
- "null"
108+
- type: array
109+
items: File
195110
outputBinding:
196-
glob: "*_gene_exp_table.tsv"
111+
glob: "*_vlcn.png"
197112

198-
mds_plots_html:
199-
type: File
113+
read_counts_gct:
114+
type: File?
200115
outputBinding:
201-
glob: "mds_plot.html"
116+
glob: "*_read_counts.gct"
202117

203-
counts_all_gct:
204-
type: File
118+
read_counts_html:
119+
type: File?
205120
outputBinding:
206-
glob: "counts_all.gct"
121+
glob: "*_read_counts.html"
207122

208-
counts_filtered_gct:
123+
diff_expr_tsv:
209124
type: File
210125
outputBinding:
211-
glob: "counts_filtered.gct"
126+
glob: "*_diff_expr.tsv"
212127

213128
stdout_log:
214129
type: stdout
215130

216131
stderr_log:
217132
type: stderr
218133

219-
baseCommand: ["/usr/bin/Rscript", "/usr/local/bin/run_deseq_lrt_step_2.R"]
220-
stdout: deseq_lrt_step_2_stdout.log
221-
stderr: deseq_lrt_step_2_stderr.log
222-
223-
$namespaces:
224-
s: http://schema.org/
225-
226-
$schemas:
227-
- https://github.com/schemaorg/schemaorg/raw/main/data/releases/11.01/schemaorg-current-http.rdf
228-
229-
s:name: "DESeq2 (LRT Step 2) - Differential gene expression analysis using contrasts"
230-
label: "DESeq2 (LRT Step 2) - Differential gene expression analysis using contrasts"
231-
s:alternateName: "Differential gene expression analysis using DESeq2 contrasts"
232-
233-
s:downloadUrl: https://raw.githubusercontent.com/Barski-lab/workflows/master/tools/deseq-lrt-step-2.cwl
234-
s:codeRepository: https://github.com/Barski-lab/workflows
235-
s:license: http://www.apache.org/licenses/LICENSE-2.0
236-
237-
s:isPartOf:
238-
class: s:CreativeWork
239-
s:name: Common Workflow Language
240-
s:url: http://commonwl.org/
241-
242-
s:creator:
243-
- class: s:Organization
244-
s:legalName: "Cincinnati Children's Hospital Medical Center"
245-
s:location:
246-
- class: s:PostalAddress
247-
s:addressCountry: "USA"
248-
s:addressLocality: "Cincinnati"
249-
s:addressRegion: "OH"
250-
s:postalCode: "45229"
251-
s:streetAddress: "3333 Burnet Ave"
252-
s:telephone: "+1(513)636-4200"
253-
s:logo: "https://www.cincinnatichildrens.org/-/media/cincinnati%20childrens/global%20shared/childrens-logo-new.png"
254-
s:department:
255-
- class: s:Organization
256-
s:legalName: "Allergy and Immunology"
257-
s:department:
258-
- class: s:Organization
259-
s:legalName: "Barski Research Lab"
260-
s:member:
261-
- class: s:Person
262-
s:name: Michael Kotliar
263-
s:email: mailto:[email protected]
264-
s:sameAs:
265-
- id: http://orcid.org/0000-0002-6486-3898
266-
267-
doc: |
268-
Runs DESeq2 analysis using contrasts from previous LRT step.
269-
270-
This tool takes the outputs from DESeq2 LRT step 1 and performs differential expression analysis using specified contrasts.
271-
272-
**Inputs:**
273-
274-
- `expression_data_rds`: RDS file containing the expression data from step 1.
275-
- `contrasts_rds`: RDS file containing the contrasts list from step 1.
276-
- `dsq_wald_rds`: RDS file containing the DESeq2 object from the Wald test in step 1.
277-
- `metadata_rds`: RDS file containing the metadata from step 1.
278-
- `contrast_indices`: Comma-separated list of integers representing contrast indices (e.g., 1,2,3).
279-
- `fdr`: Adjusted p-value (FDR) threshold for significance. Default: 0.1.
280-
- `lfcthreshold`: Log2 fold change threshold for significance. Default: 0.59.
281-
- `regulation`: Direction of differential expression comparison ('both', 'up', 'down'). Default: 'both'.
282-
283-
**Outputs:**
284-
285-
- Differential expression reports for each contrast.
286-
- MA plots (PNG and PDF) for each contrast.
287-
- MDS plots (HTML) for each contrast.
288-
- GCT files (counts_all.gct and counts_filtered.gct) for each contrast.
134+
baseCommand: [run_deseq_lrt_step_2.sh]
135+
stdout: error_msg.txt
136+
stderr: error_report.txt

0 commit comments

Comments
 (0)