|
0
|
1 # Dynamic Galaxy Tool wrappers
|
|
|
2
|
|
|
3 Use this repository as a template to develop a dynamic Galaxy tools in one minute!
|
|
|
4
|
|
|
5 ## Step 1: clone this repository
|
|
|
6
|
|
|
7 ```bash
|
|
|
8 git clone https://github.com/statonlab/dynamic-galaxy-tool-wrappers.git
|
|
|
9 ```
|
|
|
10
|
|
|
11 ## Step 2: edit tool requirements
|
|
|
12
|
|
|
13 Open the `dynamic_tool_wrappers_macros.xml` file and add your tool requirements. **Only tools from the
|
|
|
14 [conda repository](https://anaconda.org/anaconda/repo) can be added as a tool requirement. For example, for a wrapper
|
|
|
15 of the **FastQC** tool, go to [https://anaconda.org/anaconda/repo](https://anaconda.org/anaconda/repo) and search for
|
|
|
16 `fastqc`. You will get a list of `fastqc` tools. Find the appropriate version and add it as a tool requirement.
|
|
|
17
|
|
|
18 Before editing tool requirement:
|
|
|
19
|
|
|
20 ```xml
|
|
|
21 <xml name="rmarkdown_requirements">
|
|
|
22 <requirement type="package" version="1.15.0.6-0">pandoc</requirement>
|
|
|
23 <requirement type="package" version="1.6">r-rmarkdown</requirement>
|
|
|
24 </xml>
|
|
|
25 ```
|
|
|
26
|
|
|
27 After editing tool requirement:
|
|
|
28
|
|
|
29 ```xml
|
|
|
30 <xml name="rmarkdown_requirements">
|
|
|
31 <requirement type="package" version="1.15.0.6-0">pandoc</requirement>
|
|
|
32 <requirement type="package" version="1.6">r-rmarkdown</requirement>
|
|
|
33 <requirement type="package" version="0.11.7">fastqc</requirement>
|
|
|
34 </xml>
|
|
|
35 ```
|
|
|
36
|
|
|
37
|
|
|
38
|
|
|
39 ## Step 3: edit template for a specific command line tool
|
|
|
40
|
|
|
41 Open the `dynamic_tool_wrappers_macros.xml` file and replace `tool_name` in
|
|
|
42 `<option value="tool_name" selected="false">tool_name</option>` with a valid command line tool name.
|
|
|
43
|
|
|
44 ```xml
|
|
|
45 <xml name="tool_name">
|
|
|
46 <param type="select" name="tool_name" multiple="false" label="Tool name">
|
|
|
47 <option value="tool_name" selected="false">tool_name</option>
|
|
|
48 </param>
|
|
|
49 </xml>
|
|
|
50 ```
|
|
|
51
|
|
|
52 Use the **FastQC** tool as an example again, the content after replacement would be
|
|
|
53
|
|
|
54 ```xml
|
|
|
55 <xml name="tool_name">
|
|
|
56 <param type="select" name="tool_name" multiple="false" label="Tool name">
|
|
|
57 <option value="fastqc" selected="false">fastqc</option>
|
|
|
58 </param>
|
|
|
59 </xml>
|
|
|
60 ```
|
|
|
61
|
|
|
62 You can add multiple `tool_name` options if the tool has sub command line tools. For example,
|
|
|
63 for the `samtools` tool, it could be
|
|
|
64
|
|
|
65 ```xml
|
|
|
66 <xml name="tool_name">
|
|
|
67 <param type="select" name="tool_name" multiple="false" label="Tool name">
|
|
|
68 <option value="samtools view" selected="false">samtols view</option>
|
|
|
69 <option value="samtools sort" selected="false">samtols sort</option>
|
|
|
70 <option value="samtools index" selected="false">samtols index</option>
|
|
|
71 </param>
|
|
|
72 </xml>
|
|
|
73 ```
|
|
|
74
|
|
|
75 ## Step 4: edit **tool name** and **tool id** in `dynamic_tool.xml`
|
|
|
76
|
|
|
77 Open the `dynamic_tool.xml` file and replace `dynamic_tool` with an appropriate **tool id** and the `dynamic tool` with
|
|
|
78 an appropriate **tool name**.
|
|
|
79
|
|
|
80 ```xml
|
|
|
81 <tool id="dynamic_tool" name="dynamic tool" version="1.0.0">
|
|
|
82 ```
|
|
|
83
|
|
|
84 Use the **FastQC** tool as an example, it could be:
|
|
|
85
|
|
|
86 ```xml
|
|
|
87 <tool id="dynamic_fastqc" name="Dynamic FastQC" version="1.0.0">
|
|
|
88 ```
|
|
|
89
|
|
|
90 ## Step 5: Publish tool to [ToolShed](https://toolshed.g2.bx.psu.edu/) or [Test ToolShed](https://testtoolshed.g2.bx.psu.edu/)
|
|
|
91
|
|
|
92 Please check [planemo's documentation site](http://planemo.readthedocs.io/en/latest/publishing.html) for more details.
|
|
|
93
|
|
|
94 * Within the tool directory, `planemo shed_init` command can be used to bootstrap a `.shed.yml` file.
|
|
|
95
|
|
|
96 ```bash
|
|
|
97 planemo shed_init --name=<name>
|
|
|
98 --owner=<shed_username>
|
|
|
99 --description=<short description>
|
|
|
100 [--remote_repository_url=<URL to .shed.yml on github>]
|
|
|
101 [--homepage_url=<Homepage for tool.>]
|
|
|
102 [--long_description=<long description>]
|
|
|
103 [--category=<category name>]*
|
|
|
104 ```
|
|
|
105
|
|
|
106 * **Create tool repository on ToolShed or Test ToolShed**
|
|
|
107
|
|
|
108 ```bash
|
|
|
109 planemo shed_create --shed_target testtoolshed
|
|
|
110 ```
|
|
|
111
|
|
|
112 * **Update a tool repository**
|
|
|
113
|
|
|
114 ```bash
|
|
|
115 planemo shed_diff --shed_target testtoolshed
|
|
|
116 ``` |