-
Notifications
You must be signed in to change notification settings - Fork 13
/
pca.cwl
292 lines (250 loc) · 7.84 KB
/
pca.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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
cwlVersion: v1.0
class: Workflow
requirements:
- class: SubworkflowFeatureRequirement
- class: StepInputExpressionRequirement
- class: InlineJavascriptRequirement
- class: MultipleInputFeatureRequirement
'sd:upstream':
rnaseq_sample:
- "rnaseq-se.cwl"
- "rnaseq-pe.cwl"
- "rnaseq-se-dutp.cwl"
- "rnaseq-pe-dutp.cwl"
- "rnaseq-se-dutp-mitochondrial.cwl"
- "rnaseq-pe-dutp-mitochondrial.cwl"
- "trim-rnaseq-pe.cwl"
- "trim-rnaseq-se.cwl"
- "trim-rnaseq-pe-dutp.cwl"
- "trim-rnaseq-pe-smarter-dutp.cwl"
- "trim-rnaseq-se-dutp.cwl"
- "trim-quantseq-mrnaseq-se.cwl"
inputs:
alias:
type: string
label: "Experiment short name/alias"
sd:preview:
position: 1
expression_files:
type:
- "null"
- File[]
default: null
format: "http://edamontology.org/format_3752"
label: "RNA-Seq experiments"
doc: "Isoform expression files from RNA-Seq experiments"
'sd:upstreamSource': "rnaseq_sample/rpkm_isoforms"
'sd:localLabel': true
expression_files_genes:
type:
- "null"
- File[]
default: null
format: "http://edamontology.org/format_3752"
label: "RNA-Seq experiments"
doc: "Gene expression files from RNA-Seq experiments"
'sd:upstreamSource': "rnaseq_sample/rpkm_genes"
expression_files_tss:
type:
- "null"
- File[]
default: null
format: "http://edamontology.org/format_3752"
label: "RNA-Seq experiments"
doc: "Common TSS expression files from RNA-Seq experiments"
'sd:upstreamSource': "rnaseq_sample/rpkm_common_tss"
expression_aliases:
type:
- "null"
- string[]
label: "Isoform expression file aliases"
doc: "Aliases to make the legend for generated plots. Order corresponds to the isoform expression files"
'sd:upstreamSource': "rnaseq_sample/alias"
group_by:
type:
- "null"
- type: enum
symbols: ["isoforms", "genes", "common tss"]
default: "isoforms"
label: "Group by"
doc: "Grouping method for features: isoforms, genes or common tss"
genelist_file:
type: File?
format: "http://edamontology.org/format_2330"
label: "Gene list to filter input genes. Headerless TSV/CSV file with 1 gene per line"
doc: "Gene list to filter input genes. Headerless TSV/CSV file with 1 gene per line"
'sd:layout':
advanced: true
outputs:
pca1_vs_pca2_plot:
type: File
format: "http://edamontology.org/format_3603"
label: "PCA1 vs PCA2 plot"
doc: "PCA1 vs PCA2 plot"
outputSource: pca/pca1_vs_pca2_plot
'sd:visualPlugins':
- image:
tab: 'Plots'
Caption: 'PCA1 vs PCA2'
pca1_vs_pca2_plot_pdf:
type: File
format: "http://edamontology.org/format_3508"
label: "PCA1 vs PCA2 plot"
doc: "PCA1 vs PCA2 plot"
outputSource: pca/pca1_vs_pca2_plot_pdf
pca2_vs_pca3_plot:
type: File
format: "http://edamontology.org/format_3603"
label: "PCA2 vs PCA3 plot"
doc: "PCA2 vs PCA3 plot"
outputSource: pca/pca2_vs_pca3_plot
'sd:visualPlugins':
- image:
tab: 'Plots'
Caption: 'PCA2 vs PCA3'
pca2_vs_pca3_plot_pdf:
type: File
format: "http://edamontology.org/format_3508"
label: "PCA2 vs PCA3 plot"
doc: "PCA2 vs PCA3 plot"
outputSource: pca/pca2_vs_pca3_plot_pdf
variance_plot:
type: File
format: "http://edamontology.org/format_3603"
label: "Variance plot"
doc: "Variance plot"
outputSource: pca/variance_plot
'sd:visualPlugins':
- image:
tab: 'Plots'
Caption: 'Variances'
variance_plot_pdf:
type: File
format: "http://edamontology.org/format_3508"
label: "Variance plot"
doc: "Variance plot"
outputSource: pca/variance_plot_pdf
pca_3d_html:
type: File
format: "http://edamontology.org/format_2331"
label: "Interactive 3D PCA plot"
doc: "Plotly generated interactive 3D PCA plot (first three components)"
outputSource: pca/pca_3d_html
pca_file:
type: File
format: "http://edamontology.org/format_3475"
label: "PCA analysis scores results"
doc: "PCA analysis scores results exported as TSV"
outputSource: pca/pca_scores_file
'sd:visualPlugins':
- scatter3d:
tab: '3D Plots'
Title: 'PCA'
xAxisTitle: 'PCA1'
yAxisTitle: 'PCA2'
zAxisTitle: 'PCA3'
colors: ["#b3de69", "#888888", "#fb8072"]
height: 600
data: [$1, $2, $3, $4]
pca_loadings_file:
type: File
format: "http://edamontology.org/format_3475"
label: "PCA analysis loadings results"
doc: "PCA analysis loadings results exported as TSV"
outputSource: pca/pca_loadings_file
'sd:visualPlugins':
- syncfusiongrid:
tab: 'PCA loadings'
Title: 'PCA loadings'
pca_stdout_log:
type: File
format: "http://edamontology.org/format_2330"
label: "PCA stdout log"
doc: "PCA stdout log"
outputSource: pca/stdout_log
pca_stderr_log:
type: File
format: "http://edamontology.org/format_2330"
label: "PCA stderr log"
doc: "PCA stderr log"
outputSource: pca/stderr_log
steps:
pca:
run: ../tools/pca.cwl
in:
expression_files:
source: [group_by, expression_files, expression_files_genes, expression_files_tss]
valueFrom: |
${
if (self[0] == "isoforms") {
return self[1];
} else if (self[0] == "genes") {
return self[2];
} else {
return self[3];
}
}
expression_aliases: expression_aliases
genelist_file: genelist_file
target_column:
default: "Rpkm"
out:
- pca1_vs_pca2_plot
- pca1_vs_pca2_plot_pdf
- pca2_vs_pca3_plot
- pca2_vs_pca3_plot_pdf
- variance_plot
- variance_plot_pdf
- pca_3d_html
- pca_scores_file
- pca_loadings_file
- stdout_log
- stderr_log
$namespaces:
s: http://schema.org/
$schemas:
- https://github.com/schemaorg/schemaorg/raw/main/data/releases/11.01/schemaorg-current-http.rdf
s:name: "PCA - Principal Component Analysis"
label: "PCA - Principal Component Analysis"
s:alternateName: ""
s:downloadUrl: https://raw.githubusercontent.com/datirium/workflows/master/workflows/pca.cwl
s:codeRepository: https://github.com/datirium/workflows
s:license: http://www.apache.org/licenses/LICENSE-2.0
s:isPartOf:
class: s:CreativeWork
s:name: Common Workflow Language
s:url: http://commonwl.org/
s:creator:
- class: s:Organization
s:legalName: "Cincinnati Children's Hospital Medical Center"
s:location:
- class: s:PostalAddress
s:addressCountry: "USA"
s:addressLocality: "Cincinnati"
s:addressRegion: "OH"
s:postalCode: "45229"
s:streetAddress: "3333 Burnet Ave"
s:telephone: "+1(513)636-4200"
s:logo: "https://www.cincinnatichildrens.org/-/media/cincinnati%20childrens/global%20shared/childrens-logo-new.png"
s:department:
- class: s:Organization
s:legalName: "Allergy and Immunology"
s:department:
- class: s:Organization
s:legalName: "Barski Research Lab"
s:member:
- class: s:Person
s:name: Michael Kotliar
s:email: mailto:michael.kotliar@cchmc.org
s:sameAs:
- id: http://orcid.org/0000-0002-6486-3898
# doc:
# $include: ../descriptions/pca.md
doc: |
Principal Component Analysis
---------------
Principal component analysis (PCA) is a statistical procedure that uses an orthogonal transformation to convert
a set of observations of possibly correlated variables (entities each of which takes on various numerical values)
into a set of values of linearly uncorrelated variables called principal components.
The calculation is done by a singular value decomposition of the (centered and possibly scaled) data matrix,
not by using eigen on the covariance matrix. This is generally the preferred method for numerical accuracy.