Repository navigation
Expand file tree
/
Copy pathnextflow_schema.json
More file actions
642 lines (642 loc) · 17.9 KB
/
Copy pathnextflow_schema.json
File metadata and controls
642 lines (642 loc) · 17.9 KB
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
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/cellgeni/nf-autoannotate/nextflow_schema.json",
"title": "nf-autoannotate pipeline parameters",
"description": "Parameter schema for nf-autoannotate. Use with Nextflow -params-file YAML files.",
"type": "object",
"allOf": [
{
"$ref": "#/$defs/tool_selection_options"
},
{
"$ref": "#/$defs/input_output_options"
},
{
"$ref": "#/$defs/reference_filtering_options"
},
{
"$ref": "#/$defs/model_reuse_options"
},
{
"$ref": "#/$defs/scanvi_options"
},
{
"$ref": "#/$defs/celltypist_options"
},
{
"$ref": "#/$defs/panhumanpy_options"
},
{
"$ref": "#/$defs/merge_output_options"
}
],
"$defs": {
"tool_selection_options": {
"title": "Tool selection options",
"type": "object",
"fa_icon": "fas fa-list-check",
"required": [
"tools"
],
"properties": {
"tools": {
"type": [
"string",
"array"
],
"description": "Annotation tools to run, as a comma-separated string or a YAML list. Any subset of celltypist, scanvi, panhumanpy.",
"pattern": "^\\s*(celltypist|scanvi|panhumanpy)\\s*(,\\s*(celltypist|scanvi|panhumanpy)\\s*)*$",
"items": {
"type": "string",
"enum": [
"celltypist",
"scanvi",
"panhumanpy"
]
},
"minItems": 1
}
}
},
"input_output_options": {
"title": "Input and output options",
"type": "object",
"fa_icon": "fas fa-file",
"required": [
"project_tag"
],
"properties": {
"ref_h5ad": {
"type": [
"string",
"null"
],
"description": "Reference AnnData .h5ad file. Required when tools includes celltypist or scanvi.",
"format": "file-path",
"exists": true
},
"query_h5ad": {
"type": [
"string",
"array"
],
"description": "Query AnnData .h5ad file(s) to annotate. Accepts a path, a glob, or a list of either. Each file is annotated separately, with the sample ID taken from the filename without its extension. Existence is checked when the workflow starts rather than during schema validation, because a glob has no single path to check.",
"items": {
"type": "string",
"minLength": 1
},
"minItems": 1,
"minLength": 1
},
"project_tag": {
"type": "string",
"description": "Short tag used in output filenames and report directory names.",
"minLength": 1,
"pattern": "^[A-Za-z0-9._-]+$"
},
"outdir": {
"type": [
"string",
"null"
],
"description": "Output directory. If unset, autoannotate-results-<project_tag> is used.",
"format": "directory-path"
},
"ref_label_col": {
"type": [
"string",
"null"
],
"description": "Reference obs column containing cell type labels. Required when tools includes celltypist or scanvi."
},
"model_sheet": {
"type": [
"string",
"null"
],
"description": "CSV or TSV with one (model, query) pair per row, read only by the ANNOTATE_WITH_MODELS entry point. Columns: tool, model, query_h5ad, and optionally model_id. A tab in the header selects TSV parsing.",
"format": "file-path",
"exists": true
}
}
},
"reference_filtering_options": {
"title": "Reference filtering options",
"type": "object",
"fa_icon": "fas fa-filter",
"properties": {
"ref_filter_col": {
"type": [
"string",
"null"
],
"description": "Reference obs column used to filter reference cells before training."
},
"ref_filter_values": {
"type": [
"string",
"null"
],
"description": "Comma-separated values to keep from ref_filter_col."
}
}
},
"model_reuse_options": {
"title": "Model reuse options",
"type": "object",
"fa_icon": "fas fa-box-archive",
"properties": {
"celltypist_model": {
"type": [
"string",
"null"
],
"description": "Optional pretrained CellTypist model path.",
"format": "file-path",
"exists": true
},
"scanvi_model_dir": {
"type": [
"string",
"null"
],
"description": "Optional pretrained scANVI model directory.",
"format": "directory-path",
"exists": true
},
"scvi_reference_model_dir": {
"type": [
"string",
"null"
],
"description": "Optional pretrained scVI reference model directory used to initialize scANVI.",
"format": "directory-path",
"exists": true
}
}
},
"scanvi_options": {
"title": "scVI/scANVI options",
"type": "object",
"fa_icon": "fas fa-network-wired",
"properties": {
"batch_key": {
"type": [
"string",
"null"
],
"description": "Optional obs column for scVI batch correction."
},
"scvi_layer": {
"type": [
"string",
"null"
],
"description": "Optional AnnData layer passed to SCVI.setup_anndata."
},
"scanvi_categorical_covariate_keys": {
"type": [
"string",
"null"
],
"description": "Comma-separated categorical covariate obs columns."
},
"scanvi_continuous_covariate_keys": {
"type": [
"string",
"null"
],
"description": "Comma-separated continuous covariate obs columns."
},
"scanvi_hvg_n_top_genes": {
"type": [
"integer",
"null"
],
"description": "Number of HVGs for scVI/scANVI training. Use 0 to keep all shared genes.",
"minimum": 0,
"default": 2500
},
"nf_scvi_metrics_config": {
"type": [
"string",
"null"
],
"description": "Optional nf-scVI-metrics-style Python config.py. Use this as a compatibility mode instead of adding the Python file path to the YAML params file. Takes precedence over individual scVI/scANVI params.",
"format": "file-path",
"exists": true
},
"unknown_label": {
"type": [
"string",
"null"
],
"description": "Unlabeled category used by scANVI.",
"minLength": 1,
"default": "Unknown"
},
"scvi_n_hidden": {
"type": [
"integer",
"null"
],
"description": "SCVI n_hidden model parameter.",
"minimum": 1
},
"scvi_n_latent": {
"type": [
"integer",
"null"
],
"description": "SCVI n_latent model parameter.",
"minimum": 1
},
"scvi_n_layers": {
"type": [
"integer",
"null"
],
"description": "SCVI n_layers model parameter.",
"minimum": 1
},
"scvi_dropout_rate": {
"type": [
"number",
"null"
],
"description": "SCVI dropout_rate model parameter.",
"minimum": 0,
"maximum": 1
},
"scvi_dispersion": {
"type": [
"string",
"null"
],
"description": "SCVI dispersion model parameter."
},
"scvi_gene_likelihood": {
"type": [
"string",
"null"
],
"description": "SCVI gene_likelihood model parameter."
},
"scvi_latent_distribution": {
"type": [
"string",
"null"
],
"description": "SCVI latent_distribution model parameter."
},
"scvi_train_max_epochs": {
"type": [
"integer",
"null"
],
"description": "SCVI.train max_epochs.",
"minimum": 1
},
"scvi_train_batch_size": {
"type": [
"integer",
"null"
],
"description": "SCVI.train batch_size.",
"minimum": 1
},
"scvi_train_train_size": {
"type": [
"number",
"null"
],
"description": "SCVI.train train_size.",
"minimum": 0,
"maximum": 1
},
"scvi_train_validation_size": {
"type": [
"number",
"null"
],
"description": "SCVI.train validation_size.",
"minimum": 0,
"maximum": 1
},
"scvi_train_early_stopping": {
"type": [
"boolean",
"null"
],
"description": "SCVI.train early_stopping."
},
"scvi_train_early_stopping_patience": {
"type": [
"integer",
"null"
],
"description": "SCVI.train early_stopping_patience.",
"minimum": 1
},
"scanvi_train_max_epochs": {
"type": [
"integer",
"null"
],
"description": "Reference SCANVI.train max_epochs.",
"minimum": 1
},
"scanvi_train_batch_size": {
"type": [
"integer",
"null"
],
"description": "Reference SCANVI.train batch_size.",
"minimum": 1
},
"scanvi_train_train_size": {
"type": [
"number",
"null"
],
"description": "Reference SCANVI.train train_size.",
"minimum": 0,
"maximum": 1
},
"scanvi_train_validation_size": {
"type": [
"number",
"null"
],
"description": "Reference SCANVI.train validation_size.",
"minimum": 0,
"maximum": 1
},
"scanvi_train_early_stopping": {
"type": [
"boolean",
"null"
],
"description": "Reference SCANVI.train early_stopping."
},
"scanvi_train_early_stopping_patience": {
"type": [
"integer",
"null"
],
"description": "Reference SCANVI.train early_stopping_patience.",
"minimum": 1
},
"scanvi_query_max_epochs": {
"type": [
"integer",
"null"
],
"description": "Query-mapping SCANVI.train max_epochs.",
"minimum": 1,
"default": 100
},
"scanvi_query_batch_size": {
"type": [
"integer",
"null"
],
"description": "Query-mapping SCANVI.train batch_size.",
"minimum": 1
},
"scanvi_query_train_size": {
"type": [
"number",
"null"
],
"description": "Query-mapping SCANVI.train train_size.",
"minimum": 0,
"maximum": 1
},
"scanvi_query_validation_size": {
"type": [
"number",
"null"
],
"description": "Query-mapping SCANVI.train validation_size.",
"minimum": 0,
"maximum": 1
},
"scanvi_query_early_stopping": {
"type": [
"boolean",
"null"
],
"description": "Query-mapping SCANVI.train early_stopping."
},
"scanvi_query_early_stopping_patience": {
"type": [
"integer",
"null"
],
"description": "Query-mapping SCANVI.train early_stopping_patience.",
"minimum": 1
},
"scanvi_query_check_val_every_n_epoch": {
"type": [
"integer",
"null"
],
"description": "Query-mapping SCANVI.train check_val_every_n_epoch.",
"minimum": 1,
"default": 10
},
"scanvi_query_plan_weight_decay": {
"type": [
"number",
"null"
],
"description": "Query-mapping SCANVI.train plan weight decay.",
"minimum": 0,
"default": 0.0
}
}
},
"celltypist_options": {
"title": "CellTypist options",
"type": "object",
"fa_icon": "fas fa-tags",
"properties": {
"celltypist_training_mode": {
"type": [
"string",
"null"
],
"enum": [
"standard",
"detailed",
null
],
"default": "detailed",
"description": "CellTypist training mode."
},
"celltypist_balance_cells_per_label": {
"type": [
"integer",
"null"
],
"description": "Maximum reference cells per label in detailed mode.",
"minimum": 1,
"default": 500
},
"celltypist_feature_selection": {
"type": [
"boolean",
"null"
],
"description": "Run feature selection before final CellTypist fitting.",
"default": true
},
"celltypist_feature_selection_top_genes": {
"type": [
"integer",
"null"
],
"description": "Top genes per label during CellTypist feature selection.",
"minimum": 1,
"default": 100
},
"celltypist_feature_selection_max_iter": {
"type": [
"integer",
"null"
],
"description": "Quick SGD iterations for feature selection.",
"minimum": 1,
"default": 5
},
"celltypist_max_iter": {
"type": [
"integer",
"null"
],
"description": "Final CellTypist model fitting iterations.",
"minimum": 1,
"default": 100
},
"celltypist_use_gpu": {
"type": [
"boolean",
"null"
],
"description": "Train CellTypist models on a GPU. Set false to train on CPU. Annotation always runs on CPU.",
"default": true
},
"celltypist_min_model_gene_overlap": {
"type": [
"number",
"null"
],
"description": "Minimum fraction of the CellTypist model's genes that must be present in the query. Below it, annotation fails. Missing genes are zero-filled, so lowering it trades prediction quality for being able to annotate at all.",
"minimum": 0,
"maximum": 1,
"default": 0.8
}
}
},
"panhumanpy_options": {
"title": "PanHumanPy options",
"type": "object",
"fa_icon": "fas fa-dna",
"properties": {
"panhumanpy_feature_names_col": {
"type": [
"string",
"null"
],
"description": "Optional query var column containing gene symbols for PanHumanPy."
}
}
},
"merge_output_options": {
"title": "Merge and output options",
"type": "object",
"fa_icon": "fas fa-table",
"properties": {
"scanvi_obs_col": {
"type": [
"string",
"null"
],
"description": "scANVI label column name written to output obs.",
"default": "scanvi_label"
},
"scanvi_score_col": {
"type": [
"string",
"null"
],
"description": "scANVI confidence column name written to output obs.",
"default": "scanvi_confidence"
},
"query_cluster_col": {
"type": [
"string",
"null"
],
"description": "Query obs cluster column used for summaries and marker genes.",
"default": "leiden"
},
"compute_missing_clusters": {
"type": [
"boolean",
"null"
],
"description": "Compute Leiden clusters if query_cluster_col is absent.",
"default": false
},
"merge_annotations": {
"type": [
"boolean",
"null"
],
"description": "Merge per-tool predictions into the query h5ad and write the cluster summary and marker genes. Unset defaults to true for the default workflow and false for ANNOTATE_WITH_MODELS, where each pair runs a single tool. Set false to publish the per-tool prediction tables alone, which skips the most expensive step of a run."
},
"marker_genes_n_top": {
"type": [
"integer",
"null"
],
"description": "Number of marker genes to report per cluster.",
"minimum": 1,
"default": 50
},
"marker_genes_method": {
"type": [
"string",
"null"
],
"enum": [
"wilcoxon",
"t-test",
null
],
"default": "wilcoxon",
"description": "Differential expression test for marker ranking."
},
"marker_dotplot": {
"type": [
"boolean",
"null"
],
"description": "Write a marker-gene dotplot PNG.",
"default": true
},
"marker_dotplot_n_top": {
"type": [
"integer",
"null"
],
"description": "Number of ranked marker genes per cluster in the dotplot.",
"minimum": 1,
"default": 5
}
}
}
}
}