The location of the files
- example_tool.py tools/mytools
- example_tool.xml tools/mytools
- my_tool_conf.xml config/
- my_job_conf.xml config/
#!/usr/bin/python | |
import sys | |
''' | |
Just a simple tool that adds the line number at | |
the end of each line | |
''' | |
with open(sys.argv[1]) as f_in, open(sys.argv[2], 'w') as f_out: | |
c = 0 | |
for l in f_in: | |
c += 1 | |
f_out.write(l.replace('\n', '') + '\t%i'%c + '\n') | |
<tool id="custom_tool_1" name="Custom Tool 1" version="0.1.0"> | |
<description>Experimental tool 1</description> | |
<command interpreter="python">example_tool.py $input $output</command> | |
<inputs> | |
<param format="tabular" name="input" type="data" label="Source file"/> | |
</inputs> | |
<outputs> | |
<data format="tabular" name="output" /> | |
</outputs> | |
<tests> | |
<test> | |
<param name="input" value="test_input.txt"/> | |
<output name="output" file="test_output.txt"/> | |
</test> | |
</tests> | |
<help> | |
The best tool ever. | |
</help> | |
</tool> |
<?xml version="1.0"?> | |
<!-- A sample job config that explicitly configures job running the way it is configured by default (if there is no explicit config). --> | |
<job_conf> | |
<plugins> | |
<plugin id="local" | |
type="runner" | |
load="galaxy.jobs.runners.local:LocalJobRunner" | |
workers="4"/> | |
<plugin id="torque1" type="runner" | |
load="galaxy.jobs.runners.pbs:PBSJobRunner" | |
workers="2"/> | |
</plugins> | |
<handlers> | |
<handler id="main"/> | |
</handlers> | |
<destinations default="local"> | |
<destination id="local" runner="local"/> | |
<destination id="torque1_dst" runner="torque1"/> | |
</destinations> | |
<tools> | |
<tool id="custom_tool_1" destination="torque1_dst"/> | |
</tools> | |
</job_conf> |
<section name="MyTools" id="mTools"> | |
<tool file="mytools/example_tool.xml" /> | |
</section> |
a b c | |
e f g | |
h i j |
This guide assumes that you have setup and ssh-ed in an EC2 instance. The instance that I used was "Ubuntu Server 14.04 LTS (HVM), SSD Volume Type - ami-f95ef58a". I would love to see some comments.
Get packages:
Install TORQUE
Add to /etc/hosts
For example:
Continue:
This should look like:
continue with:
Add HOSTNAME to
Add root@HOSTNAME to:
Start everything:
Make sure this this command:
Produces something like this:
Make a test job
Make the file: test.sh
Submit it:
Make sure that everything went ok:
Install pbs-python
Install galaxy
edit config/galaxy.ini and add: (MAKE SURE YOU ARE MAKING THIS CHANGE IN THE
[server:main]
SECTION!!)Make sure that it runs fine:
Now it is a nice time to:
test_input.txt
(Get_data --> upload file)stop server with control-c
Let's add a tool: (Assuming you have a local copy of these files in ../)
Edit config/galaxy.ini and add the line:
Rerun server:
You should be able to see the tool at the end of the tool bar:




Make a workflow to test the tool installation
Save it and run, giving as input the file
test.txt
The results should look like this:
Configure my_tool to run via TORQUE
Stop the serve (ctrl-c)
Edit galaxy/config.ini and add the following lines:
Create the
cluster_files_directory
Rerun the server and run the same workflow again (exactly as before)
With qstat you should be able to confirm that the workflow was submitted:
Also the resulted file should be the same as before.