File tree Expand file tree Collapse file tree 2 files changed +33
-1
lines changed
Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Original file line number Diff line number Diff line change 1+ Cluster Usage
2+ ==============================
3+
4+ ------------------------------
5+ ``GALAXY_SLOTS ``
6+ ------------------------------
7+
8+ ``GALAXY_SLOTS `` is a special environment variable that is set in a Galaxy
9+ tool's runtime environment. If the tool you are working on allows configuring
10+ the number of processes or threads that should be spawned, this variable
11+ should be used.
12+
13+ For example, the StringTie (tool available `here
14+ <https://github.com/galaxyproject/tools-iuc/blob/master/tools/stringtie/stringtie.xml> `__)
15+ binary ``stringtie `` can take an argument ``-p `` that allows specification
16+ of the number of threads to be used. The Galaxy tool sets this up as follows::
17+
18+ stringtie "$input_bam" -o "$output_gtf" -p "\${GALAXY_SLOTS:-1}" ...
19+
20+ Here we use ``\${GALAXY_SLOTS:-Z} `` instead of a fixed value (Z being an
21+ integer representing a default value in non-Galaxy contexts). The
22+ backslash here is because this value is interpreted at runtime as
23+ environment variable - not during command building time as a templated
24+ value. Now server administrators can configure how many processes the
25+ tool should be allowed to use.
26+
27+ For information on how server administrators can configure this value for
28+ a particular tool, check out `the Galaxy wiki
29+ <https://wiki.galaxyproject.org/Admin/Config/GALAXY_SLOTS> `__.
30+
31+ .. _stringtie : https://ccb.jhu.edu/software/stringtie/
Original file line number Diff line number Diff line change @@ -9,8 +9,9 @@ installed - check out <writing> if you have never developed a Galaxy tool.
99
1010.. include :: _writing_testing.rst
1111.. include :: _writing_collections.rst
12+ .. include :: _writing_clusters.rst
1213
13- .. _Galaxy : ( http://galaxyproject.org/)
14+ .. _Galaxy : http://galaxyproject.org/
1415.. _Docker : https://www.docker.com/
1516.. _Vagrant : https://www.vagrantup.com/
1617.. _BWA : http://bio-bwa.sourceforge.net/
You can’t perform that action at this time.
0 commit comments