-
Notifications
You must be signed in to change notification settings - Fork 11
Managing Custom Tools
We expect the code base or tool to be tagged and released in order to appropriately organize the tool in galaxy.
- Tag the code:
#Create a Tag
git tag -a v0.1.0 -m "my version 0.1.0"
#Tag a specific commit
git tag -a v0.1.0 9fceb02
#Push your tag
git push origin v0.1.0
-
Create a release that points to the tag just created.
-
Contact your friendly Galaxy admin and request to install your tool for the release just created. Wait, you are the admin? Oh, keep following along then.
-
Create a new directory under
galaxy/tools
named after the git repo.
cd galaxy/tools
mkdir my_galaxy_tool
- Download the archived release.
cd my_galaxy_tool
wget https://github.com/organization/my_galaxy_tool/archive/v0.1.0.tar.gz
tar -zxvf v0.1.0.tar.gz
- Add the tool to the
galaxy/tool_conf.xml
<section id="best_tool" name="Best Tool Ever">
<tool file="my_galaxy_tool/v0.1.0/tool.xml"/>
</section>
This section describes the process for preparing tools for a toolshed (usually local). This documentation does not thoroughly describe preparing tools for the public Galaxy Toolshed, but instead the "bare minimum" needed for our local toolshed.
Set up planemo config in ~/.planemo.yml
:
shed_username: "creason"
sheds:
galaxy2shed:
key: "rAndOMaPIkEy123"
url: "https://galaxy.ohsu.edu/toolshed/"
Create .shed.yml
file:
owner: "creason"
remote_repository_url: "https://github.com/ohsu-comp-bio/compbio-galaxy-wrappers/tree/master/bam-matcher"
homepage_url: "https://bitbucket.org/sacgf/bam-matcher/wiki/Home"
categories:
- "CompBio Galaxy Wrappers"
repositories:
bam-matcher:
description: "Compare two BAM files to see if they are from the same samples"
include:
- bam-matcher.conf
- bam-matcher.xml
- tool_data_table_conf.xml.sample
- tool-data/all_fasta.loc.sample
Lint tool:
planemo shed_lint --tools
Create and Upload tool to shed:
planemo shed_create --shed_target galaxy2shed
More docs for .shed.yaml file.
This section describes the process for creating a conda environment for galaxy when the source repository is private (and a conda package does not exist).
As the normal user, clone the git repository into the src directory on exacloud.
cd /home/exacloud/lustre1/galaxy/src
git clone https://github.com/ohsu-comp-bio/smmart_utils.git
sudo chown -R galaxyuser:galaxy smmart_utils
Switch to galaxyuser
and create a python conda env. Be sure to follow the correct format for naming conda envs in galaxy __name_of_env@version
.
sudo su - galaxyuser
/home/exacloud/lustre1/galaxy/galaxy/database/dependencies/_conda/bin/conda create -y --channel bioconda --channel conda-forge --channel defaults --name [email protected] python=3.5.5
Activate the env and install the local git repository using pip.
source /home/exacloud/lustre1/galaxy/galaxy/database/dependencies/_conda/bin/activate [email protected]
pip install git+file:///home/exacloud/lustre1/galaxy/src/smmart_utils
If you receive an Cannot uninstall 'certifi'.
error during pip install, run with --ignore-installed
flag.
pip install --ignore-installed git+file:///home/exacloud/lustre1/galaxy/src/smmart_utils