-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6cb3919
commit 4cb7536
Showing
2 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
Creating Galaxy tools from python scripts using argparse | ||
======================================================== | ||
|
||
If a python script should be wrapped that creates its command line interface | ||
using the argparse library, then planemo can generate a good starting point. | ||
|
||
All you need to do is to pass the path to the python source file containing | ||
the argparse definition. Lets use ``tests/data/autopygen/autopygen_end_to_end_sub.py`` | ||
from the planemo tests as an example: | ||
|
||
:: | ||
|
||
$ planemo tool_init -i e2e -n e2e | ||
--autopygen tests/data/autopygen/autopygen_end_to_end_sub.py | ||
-- tool tool.xml | ||
|
||
Here we only provided the ``id`` and ``name`` in addition to the python sources | ||
and planemo creates a pretty tool xml files that can serve as a good starting point | ||
to create a functional Galaxy tool in ``tool.xml``. | ||
Additional information, e.g. requirements, help, etc, can and should be given with | ||
additional parameters to planemo. | ||
|
||
There are a few points that need to be edited in any case. Most importantly | ||
since in most cases ``argparse`` does not distinguish between input and output | ||
files all file parameters will be rendered as input parameters of the tool. | ||
|
||
Please open an issue if you have ideas on how to improve the generated tools: | ||
https://github.com/galaxyproject/planemo/issues | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters