Commit 6f616e22 authored by Aaron Petkau's avatar Aaron Petkau

Fixed up the tools and workflows installation guide

parent b3bae515
......@@ -11,10 +11,21 @@ Philip Mabon, Aaron Petkau
Installing the Tools
====================
The tools under the `tools/` directory can be installed to a Galaxy Tool Shed and then to Galaxy using the following steps.
The Core Phylogenomics Pipeline makes use of a mixture of local (installed in a local Galaxy Tool Shed) tools as well as tools in the main [Galaxy Tool Shed][]. To install these dependency tools please follow the steps in both sections below.
Step 1: Building Tool Shed Packages
-----------------------------------
Installing Local Tools
----------------------
The local tools are meant to be installed in a local Galaxy Tool Shed. These are located under the `tools/` directory and include the following:
* **phyml**
* **smalt_collection**
* **freebayes**
* **core-pipeline tools**
These can be installed to a Galaxy Tool Shed and then to Galaxy using the following steps.
### Step 1: Building Tool Shed Packages
In order to build packages that can be uploaded to a Galaxy Tool Shed please run the following command.
......@@ -25,26 +36,23 @@ $ ./build_for_toolshed.sh
This will build a number of `.tar.gz` files within the `build/` directory that can then be uploaded into a Galaxy Tool Shed.
Step 2: Creating Repositories for Tool Shed Packages
----------------------------------------------------
### Step 2: Creating Repositories for Tool Shed Packages
In order to install tools into your own local instance of a Galaxy Tool Shed, you first need to create empty repositories. This can be accomplished by:
1. Log into your Galaxy Tool Shed. On the left panel please find and click on the **Create new repository** link.
2. Fill out the name of the repository, for example for `core_phylogenomics_pipeline.tar.gz` you can fill out **core_phylogenomics_pipeline**. Fill out any other information.
2. Fill out the name of the repository, for example for `core_phylogenomics_pipeline.tar.gz` you can fill out **core_phylogenomics_pipeline** (please make sure to name the repository the same name as the tarball minus `.tar.gz`). Fill out any other information.
3. Click on **Save**.
4. Repeat for any other files under `build/`.
Step 3: Upload Tool Shed Packages
---------------------------------
### Step 3: Upload Tool Shed Packages
1. Find and click on one of your new empty repositories.
2. In the upper right click on **Upload files to repostory**.
3. From here **Browse** to one of the tool shed packages under `build/` and upload this package.
4. In the upper right corner under **Repository Actions** click on **Reset all repository metadata**. You should now see a screen listing the tools and dependencies of this repository.
Step 4: Install Packages to Galaxy
----------------------------------
### Step 4: Install Packages to Galaxy
Once you have uploaded the packages to a Galaxy Tool Shed, you can install to a local version of Galaxy linked up to the Tool Shed by following the below steps.
......@@ -53,30 +61,11 @@ Once you have uploaded the packages to a Galaxy Tool Shed, you can install to a
3. Click on the arrow next to the tool and click on **Preview and install**.
4. Wait for Galaxy to install your tool.
Step 5: Install Additional Local Dependencies
---------------------------------------------
The following additional dependency packages included in this repository need to be installed to the Galaxy Tool Shed, and then into Galaxy. These are located under `tools/`. The full list of dependencies is:
* phyml
* smalt_collection
Installing External Tools
-------------------------
In order to install the dependencies, use the following steps.
Once the above local dependency packages have been installed to the Tool Shed, we can begin to install the external dependencies into Galaxy. The list of packages that need to be installed includes.
1. Build dependencies using `build_for_toolshed.sh`.
2. Log into a Galaxy Tool Shed and create repositories for each dependency.
3. Upload tarball packages for each dependency.
Step 6: Install Dependency Packages to Galaxy
---------------------------------------------
Once the above local dependency packages have been installed to the Tool Shed, we can begin to install the packages along with other remote dependencies into Galaxy. The list of packages that need to be installed includes.
* phyml (local)
* smalt_collection (local)
* freebayes (local)
* package_freebayes_0_9_9_296a0fad (local)
* core-pipeline tools (local)
* http://toolshed.g2.bx.psu.edu/repos/devteam/sam_to_bam/sam_to_bam/1.1.4
* http://toolshed.g2.bx.psu.edu/repos/devteam/samtools_mpileup/samtools_mpileup/0.0.3
* http://toolshed.g2.bx.psu.edu/repos/gregory-minevich/bcftools_view/bcftools_view/0.0.1
......@@ -90,10 +79,10 @@ This can be accomplished with the following steps from within your running Galax
4. Install the package into Galaxy.
5. Repeat for each of the packages listed above.
Step 7: Test out your tool in Galaxy
------------------------------------
Testing Tools in Galaxy
-----------------------
Once you've finished installing your tool, you should be able to test it out within Galaxy. This can be automated by running the functional tests using the commands. This is adapted from the [Testing Installed Tools][] document.
Once you've finished installing both your local and external tools, you should be able to test it out within Galaxy. This can be automated by running the functional tests using the commands. This is adapted from the [Testing Installed Tools][] document.
```bash
$ export GALAXY_TOOL_DEPENDENCY_DIR=/path/to/tool-dependencies
......@@ -106,10 +95,10 @@ This should generate a report in the file `run_functional_tests.html`.
Installing the Workflow
=======================
Once the tools are installed the workflow under `workflows/` can be installed. This can be accomplished using the following steps.
Once the tools are installed the workflow under `workflows/` can be installed. This can be accomplished using the following.
Step 1: Generating a Galaxy workflow file
-----------------------------------------
Generating a Galaxy workflow file
---------------------------------
The core snp pipeline workflow is stored as a Galaxy workflow, which contains references to all tools used + tool sheds used to install these tools. For example freebayes is refered to as `galaxy-shed.corefacility.ca/repos/phil/freebayes/freebayes/0.0.4`. If you have installed any of the local tools in a differently named tool shed, than this full path will not work. To work around this issue, a template file is included for the workflow `workflows/core_phylogenomics_pipeline_workflow/Galaxy-Workflow-Core_SNP_Pipeline.ga.tt`. We can generate the Galaxy-usable workflow file from this template file by using a command similar to:
......@@ -117,28 +106,37 @@ The core snp pipeline workflow is stored as a Galaxy workflow, which contains re
$ perl generate_galaxy_workflow.pl --local-toolshed localhost:9009/repos/aaron workflows/core_phylogenomics_pipeline_workflow/Galaxy-Workflow-Core_SNP_Pipeline.ga.tt > workflows/core_phylogenomics_pipeline_workflow/Galaxy-Workflow-Core_SNP_Pipeline.ga
```
Once this Galaxy workflow file has been generated we directly upload to Galaxy instance or a Galaxy tool shed using the below steps.
Please replace `localhost:9009/repos/aaron` with the location and user of the tools under your local toolshed. Once this Galaxy workflow file has been generated we can either directly upload the workflow to Galaxy instance or upload to a Galaxy tool shed using the below steps.
Step 2: Upload Workflow to Tool Shed
------------------------------------
Upload Workflow to a Tool Shed
------------------------------
The workflow can be uploaded to a Galaxy Tool Shed using the following commands.
The workflow can be uploaded to a local Tool Shed and then installed to Galaxy using the following steps.
### Step 1: Upload Workflow to Tool Shed
1. Run the script `build_for_toolshed.sh`. This will generate a file `build/core_phylogenomics_pipeline_workflow.tar.gz` containing the workflow.
2. In the Galaxy Tool Shed, create a new repository to contain your workflow.
3. From the button at the top right that says **Upload files to repository** please upload the file containing the workflow `build/core_phylogenomics_pipeline_workflow.tar.gz`.
Step 3: Install Workflow from Tool Shed to Galaxy
-------------------------------------------------
To install a workflow from the Tool Shed into a running Galaxy instance please use the following steps.
### Step 2: Install Workflow from Tool Shed to Galaxy
1. From the Galaxy instance go to **Admin** and then to **Search and browse tool sheds**.
2. Find the particular tool shed containing your workflow and then find the workflow repository you just uploaded.
3. Install this workflow into Galaxy.
Upload Workflow Directly to a Galaxy Instance
---------------------------------------------
To upload the workflow directly to a running Galaxy instance the following steps can be performed.
1. Log into Galaxy and in the top menu click on **Workflow**.
2. Click on the button to **Upload or import workflow**.
3. Find and browse for the workflow file `Galaxy-Workflow-Core_SNP_Pipeline.ga`.
4. Upload this workflow into Galaxy.
Updating Workflow
=================
-----------------
If you wish to update the workflow, the template file can be generated with a command like:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment