-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathgalaxy.xsd
More file actions
8637 lines (7863 loc) · 396 KB
/
galaxy.xsd
File metadata and controls
8637 lines (7863 loc) · 396 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
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:gxdocs="http://galaxyproject.org/xml/1.0" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:annotation>
<xs:appinfo>Galaxy Schema</xs:appinfo>
<xs:documentation xml:lang="en">A Galaxy XML tool wrapper</xs:documentation>
</xs:annotation>
<xs:element name="tool">
<xs:annotation gxdocs:best_practices="tools">
<xs:documentation xml:lang="en"><![CDATA[
The outer-most tag set of tool XML files. Attributes on this tag apply to the
tool as a whole.
### Tool profile
List of behavior changes associated with profile versions:
#### 16.04
- Disable implicit extra file collection. All dynamic extra file collection requires a `discover_datasets` tag.
- Disable `format="input"` and require explicit metadata targets (`metadata_source`, `format_source`).
- Disable `interpreter` use `$__tool_directory__`.
- Disable `$param_file` use `configfile`.
- Disable default tool version of 1.0.0.
- Use non zero exit code as default stdio error condition (before non-empty stderr).
#### 17.09
- Introduce `provided_metadata_style` with default `"default"`. Restore legacy behavior by setting
this to `"legacy"`.
#### 18.01
- Use a separate home directory for each job.
#### 18.09
- References to other inputs need to be fully qualified by using `|`.
- Do not allow provided but illegal default values.
- Do not use Galaxy python environment for `manage_data` tools.
#### 19.05
- Change default Python version from 2.7 to 3.5
#### 20.05
- json config files:
- unselected optional `select` and `data_column` parameters get `None` instead of `"None"`
- multiple `select` and `data_column` parameters are lists (before comma separated string)
#### 20.09
- Exit immediately if a command exits with a non-zero status (`set -e`).
- Assume sort order for collection elements.
### 21.09
- Do not strip leading and trailing whitespaces in `from_work_dir` attribute.
- Do not use Galaxy Python virtual environment for `data_source` tools. `data_source` tools should explicitly use the `galaxy-util` package.
### 23.0
- Text parameters that are inferred to be optional (i.e the `optional` tag is not set, but the tool parameter accepts an empty string)
are set to `None` for templating in Cheetah. Older tools receive the empty string `""` as the templated value.
### 24.0
- Do not use Galaxy python environment for `data_source_async` tools.
- Drop request parameters received by data source tools that are not declared in `<request_param_translation>` section.
### 24.2
- require a valid `data_ref` attribute for `data_column` parameters
### 25.1
- Do not use user preferences to store credentials for tools anymore. Use the new `<credentials>` tag in the `<requirements>` section of the tool XML instead.
### Examples
A normal tool:
```xml
<tool id="seqtk_seq"
name="Convert FASTQ to FASTA"
version="1.0.0"
profile="16.04"
>
```
A ``data_source`` tool contains a few more relevant attributes.
```xml
<tool id="ucsc_table_direct1"
name="UCSC Main"
version="1.0.0"
hidden="false"
profile="16.01"
tool_type="data_source"
URL_method="post">
```
]]></xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:all>
<!-- TODO: Move the anyType further into macros def... -->
<xs:element name="macros" type="Macros" minOccurs="0"/>
<xs:element name="edam_topics" type="EdamTopics" minOccurs="0"/>
<xs:element name="edam_operations" type="EdamOperations" minOccurs="0"/>
<xs:element name="xrefs" type="xrefs" minOccurs="0"/>
<xs:element name="creator" type="Creator" minOccurs="0"/>
<xs:element name="requirements" type="Requirements" minOccurs="0">
<!-- Ensure unique credentials names across all credentials elements -->
<xs:unique name="uniqueCredentialsNames">
<xs:selector xpath="credentials"/>
<xs:field xpath="@name"/>
</xs:unique>
</xs:element>
<xs:element name="required_files" type="RequiredFiles" minOccurs="0"/>
<xs:element name="entry_points" type="EntryPoints" minOccurs="0" maxOccurs="1"/>
<xs:element name="description" type="xs:string" minOccurs="0">
<xs:annotation gxdocs:best_practices="tool-descriptions">
<xs:documentation xml:lang="en"><![CDATA[The value is displayed in
the tool menu immediately following the hyperlink for the tool (based on the
``name`` attribute of the ``<tool>`` tag set described above).
### Example
```xml
<description>table browser</description>
```
]]></xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="icon" type="Icon" minOccurs="0"/>
<xs:element name="parallelism" type="Parallelism" minOccurs="0"/>
<xs:element name="version_command" type="VersionCommand" minOccurs="0"/>
<xs:element name="action" type="ToolAction" minOccurs="0" maxOccurs="1"/>
<xs:element name="environment_variables" type="EnvironmentVariables" minOccurs="0" maxOccurs="1"/>
<xs:element name="command" type="Command" minOccurs="0" maxOccurs="1"/>
<xs:element name="expression" type="Expression" minOccurs="0" maxOccurs="1"/>
<xs:element name="request_param_translation" type="RequestParameterTranslation" minOccurs="0"/>
<xs:element name="configfiles" type="ConfigFiles" minOccurs="0"/>
<xs:element name="outputs" type="Outputs" minOccurs="0"/>
<xs:element name="inputs" type="Inputs" minOccurs="0"/>
<xs:element name="tests" type="Tests" minOccurs="0"/>
<xs:element name="stdio" type="Stdio" minOccurs="0"/>
<xs:element name="help" type="Help" minOccurs="0" maxOccurs="1"/>
<xs:element name="code" type="Code" minOccurs="0"/>
<xs:element name="uihints" type="UIhints" minOccurs="0"/>
<xs:element name="options" type="Options" minOccurs="0"/>
<xs:element name="citations" type="Citations" minOccurs="0"/>
</xs:all>
<xs:attribute name="id" type="xs:string" use="required">
<xs:annotation gxdocs:best_practices="tool-ids">
<xs:documentation xml:lang="en">Must be unique across all tools;
should be lowercase and contain only letters, numbers, and underscores.
It allows for tool versioning and metrics of the number of times a tool is used,
among other things.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="name" type="xs:string" use="required">
<xs:annotation gxdocs:best_practices="tool-names">
<xs:documentation xml:lang="en">This string is what is displayed as a
hyperlink in the tool menu.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="version" type="xs:string" default="1.0.0">
<xs:annotation gxdocs:best_practices="tool-versions">
<xs:documentation xml:lang="en">This string allows for tool versioning
and should be increased with each new version of the tool. The value should
follow the [PEP 440](https://www.python.org/dev/peps/pep-0440/) specification.
It defaults to ``1.0.0`` if it is not included in the tag.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="hidden" type="PermissiveBoolean" default="false">
<xs:annotation>
<xs:documentation xml:lang="en">Allows for tools to be loaded upon
server startup, but not displayed in the tool menu. This attribute should be
applied in the toolbox configuration instead and so should be considered
deprecated.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="display_interface" type="PermissiveBoolean">
<xs:annotation>
<xs:documentation xml:lang="en">Disable the display the tool's
graphical tool form by setting this to ``false``.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="tool_type" type="ToolTypeType">
<xs:annotation>
<xs:documentation xml:lang="en">Allows for certain framework
functionality to be performed on certain types of tools. Normal tools that execute
typical command-line jobs do not need to specify this, special kinds of tools such
as [Data Source](https://docs.galaxyproject.org/en/latest/dev/data_source.html) and
[Data Manager](https://galaxyproject.org/admin/tools/data-managers/) tools should
set this to have values such as ``data_source``, ``data_source_async`` or
``manage_data``.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="profile" type="xs:string">
<xs:annotation gxdocs:best_practices="tool-profile">
<xs:documentation xml:lang="en">This string specifies the minimum Galaxy
version that should be required to run this tool. Certain legacy behaviors such
as using standard error content to detect errors instead of exit code are disabled
automatically if profile is set to any version newer than ``16.01``. See above
for the list of behavior changes associated with profile versions.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="license" type="xs:string">
<xs:annotation>
<xs:documentation xml:lang="en">This string specifies any full URI or a
a short [SPDX](https://spdx.org/licenses/) identifier for a license for this tool
wrapper. The tool wrapper version can be independent of the underlying tool. This
license covers the tool XML and associated scripts shipped with the tool.
This is interpreted as [schema.org/license](https://schema.org/license) property.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="python_template_version" type="xs:float">
<xs:annotation>
<xs:documentation xml:lang="en">This string specifies the minimum Python
version that is able to fill the Cheetah sections of the tool. If unset defaults
to 2.7 if the profile is older than 19.05, otherwise defaults to 3.5. Galaxy will
attempt to convert Python statements in Cheetah sections using [future](http://python-future.org/)
if Galaxy is run on Python 3 and ``python_template_version`` is below 3.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="workflow_compatible" type="xs:boolean" default="true">
<xs:annotation>
<xs:documentation xml:lang="en">This attribute indicates if
this tool is usable within a workflow (defaults to ``true`` for normal tools and
``false`` for data sources).</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="URL_method" type="URLmethodType">
<xs:annotation>
<xs:documentation xml:lang="en">*Deprecated* and ignored,
use a [request_param](#tool-request-param-translation-request-param) element with ``galaxy_name="URL_method"`` instead.
Was only used if ``tool_type`` attribute value is ``data_source`` or ``data_source_async`` -
this attribute defined the HTTP request method to use when communicating with an external data source application
(default: ``get``).</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="require_login" type="xs:boolean">
<xs:annotation>
<xs:documentation xml:lang="en">Documentation needed</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:complexType name="Icon">
<xs:annotation>
<xs:documentation xml:lang="en">Icon image associated with the tool. Ideally, this should be a square PNG image with maximum dimensions of 512x512 pixels.</xs:documentation>
</xs:annotation>
<xs:attribute name="src" type="xs:string" use="required">
<xs:annotation>
<xs:documentation xml:lang="en">Relative path to the icon image. It must be contained within the tool directory.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="Macros">
<xs:annotation>
<xs:documentation xml:lang="en">Frequently, tools may require the same XML
fragments be repeated in a file (for instance similar conditional branches,
repeated options, etc...) or among tools in the same repository. Galaxy tools
have a macro system to address this problem.
For more information, see [planemo documentation](https://planemo.readthedocs.io/en/latest/writing_advanced.html#macros-reusable-elements)</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="import" type="MacroImportType" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation xml:lang="en"><![CDATA[
The ``import`` element allows specifying an XML file containing shared macro definitions that can then
be reused by all the tools contained in the same directory/repository.
Example:
````
<macros>
<import>macros.xml</import>
</macros>
````]]></xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="token" type="xs:anyType" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation xml:lang="en"><![CDATA[
The ``token`` element defines a value, like a constant, that can then be replaced anywhere in any tool importing the token.
Definition example:
````
<macros>
<token name="@TOOL_VERSION@">1.0.0</token>
</macros>
````
Usage example:
````
<requirements>
<requirement type="package" version="@TOOL_VERSION@">mypackage</requirement>
</requirements>
````]]></xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="xml" type="xs:anyType" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation xml:lang="en"><![CDATA[
The ``xml`` element, inside macros, allows defining a named XML fragment that can be reused (expanded) anywhere in the tool or tools that use the macro.
Definition example:
````
<macros>
<xml name="citations">
<citations>
....
</citations>
</xml>
</macros>
````
Usage example:
````
<expand macro="citations" />
````
]]></xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="macro" type="xs:anyType" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation xml:lang="en"><![CDATA[
A generalisation for macro tokens, templates and xml macros, i.e.
`<macro name="an_xml_macro" type="xml">` is identical to `<xml name="an_xml_macro">`,
`<macro name="a_template" type="template">` is identical to `<template name="a_template">`, and
`<macro name="a_token" type="xml">` is identical to `<token name="a_token">`.
]]></xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="EntryPoints">
<xs:annotation>
<xs:documentation xml:lang="en"><![CDATA[
This is a container tag set for the ``entry_point`` tag that contains ``port`` and ``url`` tags
described in greater detail below. ``entry_point``s describe InteractiveTool entry points
to a tool.
]]></xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="entry_point" type="EntryPoint" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="EntryPoint" mixed="true">
<xs:annotation>
<xs:documentation xml:lang="en"><![CDATA[
This tag set is contained within the ``<entry_point>`` tag set. Access to entry point
ports and urls are included in this tag set. These are used by InteractiveTools
to provide access to graphical tools in real-time.
```xml
<entry_points>
<entry_point name="Example name" label="example">
<port>80</port>
<url>landing/${template_enabled}/index.html</url>
</entry_point>
</entry_points>
```
]]></xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="port" type="EntryPointPort" minOccurs="1" maxOccurs="1"/>
<xs:element name="url" type="EntryPointURL" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
<xs:attribute name="name" type="xs:string" use="required">
<xs:annotation>
<xs:documentation xml:lang="en">The name of the entry point.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="label" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">A unique label to identify the entry point. Used by interactive client tools to connect.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="requires_domain" type="PermissiveBoolean" default="true">
<xs:annotation>
<xs:documentation xml:lang="en">Whether domain-based proxying is required for the entry point. Default is True.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="requires_path_in_url" type="PermissiveBoolean" default="false">
<xs:annotation>
<xs:documentation xml:lang="en"><![CDATA[
Whether the InteractiveTool proxy will add the entry point path to the URL provided to the interactive tool. Only
relevant when path-based proxying is configured (``requires_domain=False``). A value of False implies that the web service
for the interactive tool fully operates with relative links. A value of True implies that the unique entry point path,
which is autogenerated each run, must be somehow provided to the web service. This can be done by injecting the path
into an environment variable by setting the attribute ``inject="entry_point_path_for_label"`` in the tool XML.
Alternatively, the attribute ``requires_path_in_header_named`` can be set to provide the path in the specified HTTP header.
The entry point path should in any case be used to configure the web service in the interactive tool to serve the content
from the provided URL path. Default value of ``requires_path_in_url`` is False.
]]></xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="requires_path_in_header_named" type="xs:string" default="">
<xs:annotation>
<xs:documentation xml:lang="en"><![CDATA[
Whether the InteractiveTool proxy will add the entry point path to an HTTP header. An empty string as value (default) means
that the path will not be provided in an HTTP header. Any other string value will define the name of the HTTP header
where the path will be injected by the proxy. See the documentation of ``requires_path_in_url`` for more information.
Default value of ``requires_path_in_header_named`` is False.
]]></xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="EntryPointPort" mixed="true">
<xs:annotation>
<xs:documentation xml:lang="en"><![CDATA[
This tag set is contained within the ``<entry_point>`` tag set. It contains the entry port.
]]></xs:documentation>
</xs:annotation>
</xs:complexType>
<xs:complexType name="EntryPointURL" mixed="true">
<xs:annotation>
<xs:documentation xml:lang="en"><![CDATA[
This tag set is contained within the ``<entry_point>`` tag set. It contains the entry URL.
]]></xs:documentation>
</xs:annotation>
</xs:complexType>
<xs:complexType name="ToolAction">
<xs:annotation>
<xs:documentation xml:lang="en">Describe the backend Python action to execute for this Galaxy tool.</xs:documentation>
</xs:annotation>
<xs:sequence>
</xs:sequence>
<xs:attribute name="module" type="xs:string" use="required">
</xs:attribute>
<xs:attribute name="class" type="xs:string" use="required">
</xs:attribute>
</xs:complexType>
<xs:attributeGroup name="Thing">
<xs:attribute name="name" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">[schema.org/name](https://schema.org/name)</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="url" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">[schema.org/url](https://schema.org/url)</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="identifier" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">[schema.org/identifier](https://schema.org/identifier)</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="image" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">[schema.org/image](https://schema.org/image)</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="address" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">[schema.org/address](https://schema.org/address)</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="email" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">[schema.org/email](https://schema.org/email)</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="telephone" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">[schema.org/telephone](https://schema.org/telephone)</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="faxNumber" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">[schema.org/faxNumber](https://schema.org/faxNumber)</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="alternateName" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">[schema.org/alternateName](https://schema.org/alternateName)</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:attributeGroup>
<xs:complexType name="Person">
<xs:annotation>
<xs:documentation xml:lang="en"><.
]]></xs:documentation>
</xs:annotation>
<xs:attributeGroup ref="Thing"/>
<xs:attribute name="givenName" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">[schema.org/givenName](https://schema.org/givenName)</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="familyName" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">[schema.org/familyName](https://schema.org/familyName)</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="honorificPrefix" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">[schema.org/honorificPrefix](https://schema.org/honorificPrefix)</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="honorificSuffix" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">[schema.org/honorificSuffix](https://schema.org/honorificSuffix)</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="jobTitle" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation xml:lang="en">[schema.org/jobTitle](https://schema.org/jobTitle)</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="Organization">
<xs:annotation>
<xs:documentation xml:lang="en"><.
]]></xs:documentation>
</xs:annotation>
<xs:attributeGroup ref="Thing"/>
</xs:complexType>
<xs:group name="PersonOrOrganization">
<xs:choice>
<xs:element name="person" type="Person"/>
<xs:element name="organization" type="Organization"/>
</xs:choice>
</xs:group>
<xs:complexType name="Creator">
<xs:annotation>
<xs:documentation xml:lang="en">The creator(s) of this work. See [schema.org/creator](https://schema.org/creator).</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:group ref="PersonOrOrganization" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="RequiredFiles">
<xs:annotation>
<xs:documentation xml:lang="en"><![CDATA[
This declaration is used to define files that must be shipped from the tool directory
for the tool to function properly in remote environments where the tool directory
is not available to the job.
All includes should be list before excludes. By default, the exclude list includes
the tool-data/**, test-data/**, and .hg/** glob patterns.
Pulsar hacks to implicitly find referenced files from the tool directory will be disabled
when this block is used. A future Galaxy tool profile version may disable these hacks
altogether and specifying this block for all referenced files should be considered a best
practice.
]]></xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="include" type="RequiredFileInclude" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="exclude" type="RequiredFileExclude" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="extend_default_excludes" type="xs:boolean" default="true">
<xs:annotation>
<xs:documentation xml:lang="en">Set this to `false` to override the default excludes for mercurial, reference, and test data.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:simpleType name="RequiredFileReferenceType">
<xs:annotation>
<xs:documentation xml:lang="en">How are files referenced in RequiredFileIncludes and RequiredFileExcludes. Paths are matched relative to the tool directory. `literal` must match the filename exactly. `prefix` will match paths based on their start. `glob` and `regex` use patterns to match files.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:enumeration value="literal"/>
<xs:enumeration value="prefix"/>
<xs:enumeration value="glob"/>
<xs:enumeration value="regex"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="RequiredFileInclude">
<xs:annotation>
<xs:documentation xml:lang="en">Describe files to include when relocating tool directory for remote execution.</xs:documentation>
</xs:annotation>
<xs:attribute name="type" type="RequiredFileReferenceType">
<xs:annotation>
<xs:documentation xml:lang="en">Type of file reference `path` is.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="path" type="xs:string">
<xs:annotation>
<xs:documentation xml:lang="en">Path to referenced files - this should be relative to the tool's directory (this is the file the tool is located in not the repository directory if these conflict).</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="RequiredFileExclude">
<xs:annotation>
<xs:documentation xml:lang="en">Describe files to exclude when relocating tool directory for remote execution.</xs:documentation>
</xs:annotation>
<xs:attribute name="type" type="RequiredFileReferenceType">
<xs:annotation>
<xs:documentation xml:lang="en">Type of file reference `path` is.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="path" type="xs:string">
<xs:annotation>
<xs:documentation xml:lang="en">Path to referenced files - this should be relative to the tool's directory (this is the file the tool is located in not the repository directory if these conflict).</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="Requirements">
<xs:annotation>
<xs:documentation xml:lang="en"><![CDATA[
This is a container tag set for the ``requirement``, ``resource``, ``container`` and
``credentials`` tags described in greater detail below. ``requirement``s describe
software packages and other individual computing requirements required to execute a tool,
while ``container``s describe Docker or Singularity containers that should be able to
serve as complete descriptions of the runtime of a tool.
]]></xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="requirement" type="Requirement" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="container" type="Container" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="resource" type="Resource" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="credentials" type="Credentials" minOccurs="0" maxOccurs="unbounded">
<!-- Ensure unique credential names across variables and secrets -->
<xs:unique name="uniqueCredentialNames">
<xs:selector xpath="variable|secret"/>
<xs:field xpath="@name"/>
</xs:unique>
<!-- Ensure unique inject_as_env values across variables and secrets -->
<xs:unique name="uniqueInjectAsEnv">
<xs:selector xpath="variable|secret"/>
<xs:field xpath="@inject_as_env"/>
</xs:unique>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Requirement">
<xs:annotation>
<xs:documentation xml:lang="en">< (e.g. [conda](https://conda.io/), the
[Galaxy Tool Shed dependency management system](https://galaxyproject.org/toolshed/tool-features/),
or [environment modules](https://modules.sourceforge.net/)).
The current best practice for tool dependencies is to [target Conda](../admin/conda_faq).
### Examples
This example shows a tool that requires the samtools 0.0.18 package.
This package is available via the Tool Shed (see
[Tool Shed dependency management](https://galaxyproject.org/toolshed/tool-features/)
) as well as [Conda](../admin/conda_faq)
and can be configured locally to adapt to any other package management system.
```xml
<requirements>
<requirement type="package" version="0.1.18">samtools</requirement>
</requirements>
```
This older example shows a tool that requires R version 2.15.1. The
``tool_dependencies.xml`` should contain matching declarations for Galaxy to
actually install the R runtime. The ``set_envirornment`` type is only respected
by the tool shed and is ignored by the newer and preferred conda dependency
resolver.
```xml
<requirements>
<requirement type="set_environment">R_SCRIPT_PATH</requirement>
<requirement type="package" version="2.15.1">R</requirement>
</requirements>
```
]]></xs:documentation>
</xs:annotation>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="type" type="RequirementType" use="required">
<xs:annotation>
<xs:documentation xml:lang="en">Valid values are ``package``, ``set_environment``, ``python-module`` (deprecated), ``binary`` (deprecated)</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="version" type="xs:string">
<xs:annotation>
<xs:documentation xml:lang="en">For requirements of type ``package`` this value defines a specific version of the tool dependency.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="Resource">
<xs:annotation>
<xs:documentation xml:lang="en"><![CDATA[
Allows to describe a resource requirement of a tool. At the moment this tag is mostly descriptive,
It can be used by dynamic job rules and serves to guide Galaxy admins.
]]></xs:documentation>
</xs:annotation>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="type" type="ResourceType" use="required">
<xs:annotation>
<xs:documentation xml:lang="en">This value describes the type of resource required by the tool at runtime. Not yet implemented in Galaxy.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="Container">
<xs:annotation>
<xs:documentation xml:lang="en">< or [Singularity](https://www.sylabs.io/singularity/)
containers - this tag allows the tool to suggest possible valid containers for this tool. The contents of the tag should
be a container image identifier appropriate for the particular container runtime being used, e.g.
``quay.io/biocontainers/fastqc:0.11.2--1`` for Docker or ``docker://quay.io/biocontainers/fastqc:0.11.2--1``
(or alternatively ``/opt/containers/fastqc.simg`` if your Galaxy installation will be loading the image from a filesystem path)
for Singularity. The ``requirements`` tag can contain multiple ``container`` tags describing suitable container options, in
which case the first container that is found by the Galaxy container resolver at runtime will be used.
Example:
```xml
<requirements>
<container type="docker">quay.io/biocontainers/fastqc:0.11.2--1</container>
</requirements>
```
Read more about configuring Galaxy to run Docker jobs
[here](https://docs.galaxyproject.org/en/master/admin/container_resolvers.html).
]]></xs:documentation>
</xs:annotation>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="type" type="ContainerType" use="required">
<xs:annotation>
<xs:documentation xml:lang="en">This value describes the type of container that the tool may be executed in and currently may be ``docker`` or ``singularity``.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="Credentials">
<xs:annotation>
<xs:documentation xml:lang="en"><![CDATA[
The ``credentials`` element allows tools to securely access external services by defining
a set of authentication credentials. These credentials are managed separately from the tool
configuration and are injected into the tool's execution environment as environment variables.
Credentials consist of:
- **Variables**: Non-sensitive configuration values (e.g., server URLs, usernames)
- **Secrets**: Sensitive authentication data (e.g., passwords, API keys, tokens)
The credentials system provides secure credential management while keeping sensitive
information separate from tool definitions. Multiple credentials sets can be defined
within a single ``requirements`` block, each with a unique name. Before executing a tool
that requires credentials, users must provide the necessary credentials through the Galaxy UI.
Security considerations:
- Credentials are stored in the jobs "job script" (the script that sets up the job's environment
and starts the tool script which contains the generated command line). The job script may be
accessible to Galaxy admins during execution of the job (and depending on the configuration
of Galaxy, after execution too).
- Credentials are not available as Cheetah variables, because they could be used in the ``command``
block which would expose their content in the generated command line which is stored in the
job's metadata (which is stored plain text in Galaxy's DB and can be shared with other users).
- Also, credentials should not be passed to the command line through environment variables:
- They will be expanded by the executing shell before execution, i.e. they will be visible on the
process list which can be a problem when jobs are executed on shared systems.
- Values of credentials are not sanitized, i.e. users could abuse them for code injection.
- If values/secrets can be supplied via a file, then a helper script that takes the variables from the
environment and writes them to a file can be used.
- For transparency, it is good to document the extent to which credentials are exposed in the tool help / credential help.
### Example
```xml
<requirements>
<credentials name="aws_s3" version="1.0" label="AWS S3 Access" description="Credentials for accessing AWS S3 buckets">
<variable name="region" inject_as_env="AWS_REGION" optional="false" label="AWS Region" description="The AWS region where your S3 bucket is located" />
<secret name="access_key" inject_as_env="AWS_ACCESS_KEY_ID" optional="false" label="Access Key ID" description="Your AWS access key ID" />
<secret name="secret_key" inject_as_env="AWS_SECRET_ACCESS_KEY" optional="false" label="Secret Access Key" description="Your AWS secret access key" />
</credentials>
<credentials name="database" version="2.1" label="Database Connection" description="Database connection credentials">
<variable name="host" inject_as_env="PGHOST" optional="false" label="Database Host" description="The hostname or IP address of the database server" />
<variable name="port" inject_as_env="PGPORT" optional="true" label="Database Port" description="The port number (default: 5432)" />
<secret name="password" inject_as_env="PGPASSWORD" optional="false" label="Database Password" description="The password for database authentication" />
</credentials>
</requirements>
```
### Tool Access
Within your tool, access the injected credentials using the specified environment variable names:
```bash
# Access AWS credentials (insecure)
aws s3 ls s3://my-bucket --region "\$AWS_REGION" --access-key "\$AWS_ACCESS_KEY_ID" --secret-key "\$AWS_SECRET_ACCESS_KEY"
# Access database credentials (the secure way, i.e. not use environment variables on the CLI)
psql -U myuser -d mydb
```
In the ``aws`` example, the content of the environment variables would be exposed in the process list of the
machine that is executing the job. Additionally, users could supply characters that are harmful on the CLI (see security considerations).
In modern versions of the ``aws`` interface credentials can only be supplied via a file.
In the postgres example we deliberately used environment variables that are picked up automatically by ``psql``,
i.e. we do not need to set it on the command line (which would expose them on the process list).
]]></xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="variable" type="CredentialsVariable" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="secret" type="CredentialsSecret" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="name" use="required">
<xs:annotation>
<xs:documentation xml:lang="en">The name of the credential set.</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="version" type="xs:string" use="required">
<xs:annotation>
<xs:documentation xml:lang="en">The version of the credential set.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="label" type="xs:string">
<xs:annotation>
<xs:documentation xml:lang="en">The label of the credential set.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="description" type="xs:string">
<xs:annotation>
<xs:documentation xml:lang="en">The description of the credential set.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="optional" type="xs:boolean">
<xs:annotation>
<xs:documentation xml:lang="en">If true, tools can run without credentials; if false, credentials must be provided before execution.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="CredentialsVariable">
<xs:annotation>
<xs:documentation xml:lang="en"><![CDATA[
This element defines a variable for credentials. The variable is injected into the
environment of the tool process as an environment variable.
]]></xs:documentation>
</xs:annotation>
<xs:attribute name="name" use="required">
<xs:annotation>
<xs:documentation xml:lang="en">The name of the variable.</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="inject_as_env" use="required">
<xs:annotation>
<xs:documentation xml:lang="en">The environment variable name to inject the value as.</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="optional" type="xs:boolean">
<xs:annotation>
<xs:documentation xml:lang="en">Whether the variable is optional for the tool to run.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="label" type="xs:string">
<xs:annotation>
<xs:documentation xml:lang="en">The label for the variable.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="description" type="xs:string">
<xs:annotation>
<xs:documentation xml:lang="en">The description for the variable.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="CredentialsSecret">
<xs:annotation>
<xs:documentation xml:lang="en"><![CDATA[
This element defines a secret for credentials. The secret is injected into the
environment of the tool process as an environment variable.
]]></xs:documentation>
</xs:annotation>
<xs:attribute name="name" use="required">
<xs:annotation>
<xs:documentation xml:lang="en">The name of the secret.</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="inject_as_env" use="required">
<xs:annotation>
<xs:documentation xml:lang="en">The environment variable name to inject the value as.</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="optional" type="xs:boolean">
<xs:annotation>
<xs:documentation xml:lang="en">Whether the secret is optional for the tool to run.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="label" type="xs:string">
<xs:annotation>
<xs:documentation xml:lang="en">The label for the secret.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="description" type="xs:string">
<xs:annotation>
<xs:documentation xml:lang="en">The description for the secret.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:simpleType name="HelpFormatType">
<xs:annotation>
<xs:documentation xml:lang="en">Document type of tool help</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:enumeration value="restructuredtext"/>
<xs:enumeration value="markdown"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="Help">
<xs:annotation gxdocs:best_practices="help-tag">
<xs:documentation xml:lang="en">< or the [Markdown site](https://www.markdownguide.org/basic-syntax/).
tag | details
--- | -------
``.. class:: warningmark`` | a yellow warning symbol
``.. class:: infomark`` | a blue information symbol
``.. image:: path-of-the-file.png :height: 500 :width: 600`` | insert a png file of height 500 and width 600 at this position |
``**bold**`` | bold
``*italic*`` | italic
``*`` | list
``-`` | list
``::`` | paragraph
``-----`` | a horizontal line
### Examples
Show a warning sign to remind users that this tool accept fasta format files only, followed by an example of the query sequence and a figure.
```xml
<help>
.. class:: warningmark
'''TIP''' This tool requires *fasta* format.
----
'''Example'''
Query sequence::
>seq1
ATCG...
.. image:: my_figure.png
:height: 500
:width: 600
</help>
```