Skip to content

Instantly share code, notes, and snippets.

View jmchilton's full-sized avatar

John Chilton jmchilton

  • Penn State University
  • Pittsburgh, PA
  • X @jmchilton
View GitHub Profile
@jmchilton
jmchilton / job_conf.xml
Created June 28, 2014 23:54
Simplest possible job_conf.xml to allow Galaxy to run tools in docker containers.
<?xml version="1.0"?>
<job_conf>
<plugins>
<plugin id="local" type="runner" load="galaxy.jobs.runners.local:LocalJobRunner" workers="4"/>
</plugins>
<handlers>
<handler id="main"/>
</handlers>
<destinations>
<destination id="local" runner="local">
% sudo apt-get install curl git software-properties-common gawk g++ gcc make libc6-dev libreadline6-dev zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 autoconf libgdbm-dev libncurses5-dev automake libtool bison pkg-config libffi-dev
% \curl -L https://get.rvm.io | bash -s stable
% source /home/vagrant/.rvm/scripts/rvm
% rvm install ruby-2.0
% rvm gemset create fpm
% rvm use @fpm
% gem install fpm
Next login
Traceback (most recent call last):
File "/home/galaxy/shed_tools/toolshed.g2.bx.psu.edu/repos/devteam/data_manager_fetch_genome_all_fasta/2ebc856bce29/data_manager_fetch_genome_all_fasta/data_manager/data_manager_fetch_genome_all_fasta.py", line 350, in <module>
if __name__ == "__main__": main()
File "/home/galaxy/shed_tools/toolshed.g2.bx.psu.edu/repos/devteam/data_manager_fetch_genome_all_fasta/2ebc856bce29/data_manager_fetch_genome_all_fasta/data_manager/data_manager_fetch_genome_all_fasta.py", line 345, in main
REFERENCE_SOURCE_TO_DOWNLOAD[ params['param_dict']['reference_source']['reference_source_selector'] ]( data_manager_dict, params, target_directory, dbkey, sequence_id, sequence_name )
File "/home/galaxy/shed_tools/toolshed.g2.bx.psu.edu/repos/devteam/data_manager_fetch_genome_all_fasta/2ebc856bce29/data_manager_fetch_genome_all_fasta/data_manager/data_manager_fetch_genome_all_fasta.py", line 186, in download_from_ucsc
path_contents = _get_files_in_ftp_path( ftp, ucsc_path )
File
@jmchilton
jmchilton / job_conf.xml
Last active August 29, 2015 14:02
Exclusive Local Runners
<?xml version="1.0"?>
<!-- Example Galaxy job_conf.xml file that ensures a handful tools run one at a time.
-->
<job_conf>
<plugins>
<plugin id="local" type="runner" load="galaxy.jobs.runners.local:LocalJobRunner" workers="2"/>
<plugin id="local_exclusive" type="runner" load="galaxy.jobs.runners.local:LocalJobRunner" workers="1"/>
</plugins>
<handlers>
<handler id="main"/>
@jmchilton
jmchilton / gist:fddaaac1df9af731dbab
Created June 18, 2014 06:42
Old (LWR) and New (Pulsar?) Routes...
## LWR Routes:
# Jobs (so much legacy cruft)
GET: [/managers/<manager_name>]/setup
GET: [/managers/<manager_name>]/clean?job_id=
GET: [/managers/<manager_name>]/launch?job_id=
GET: [/managers/<manager_name>]/check_complete?job_id=
GET: [/managers/<manager_name>]/kill?job_id=
GET: [/managers/<manager_name>]/input_path?job_id=
(venv)vagrant@mesos:~/mesos_example$ python test_framework.py 127.0.1.1:5050
/home/vagrant/mesos_example/venv/local/lib/python2.7/site-packages/pkg_resources.py:991: UserWarning: /home/vagrant/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).
warnings.warn(msg, UserWarning)
I0614 20:42:54.441416 3420 sched.cpp:126] Version: 0.19.0
I0614 20:42:54.445785 3424 sched.cpp:222] New master detected at master@127.0.1.1:5050
I0614 20:42:54.446276 3424 sched.cpp:230] No credentials provided. Attempting to register without authentication
I0614 20:42:54.450227 3424 sched.cpp:397] Framework registered with 20140614-194745-16842879-5050-1216-0006
Registered with framework ID 20140614-194745-16842879-5050-1216-0006
Got 1 resource offers
Got resource offer 20140614-194745-16842879-5050-1216-610
@jmchilton
jmchilton / cool.py
Created June 10, 2014 19:59
Examples of determining recent usage in dynamic destinations
import logging
log = logging.getLogger( __name__ )
from datetime import timedelta
def cool_runner( rule_helper, user_email ):
job_count = rule_helper.job_count(
for_user_email=user_email,
created_in_last=timedelta(days=10),
@jmchilton
jmchilton / bowtie2.xml
Last active August 29, 2015 14:02
Modified tools from dataset collection presentation.
<tool id="bowtie2" name="Bowtie2" version="0.2">
<!-- Wrapper compatible with Bowtie version 2.0.0 -->
<description>is a short-read aligner</description>
<version_command>bowtie2 --version</version_command>
<requirements>
<requirement type="package" version="2.1.0">bowtie2</requirement>
<requirement type="package" version="0.1.18">samtools</requirement>
</requirements>
<command>
diff --git a/lib/galaxy/jobs/runners/lwr.py b/lib/galaxy/jobs/runners/lwr.py
index 6c4efba..1b4c821 100644
--- a/lib/galaxy/jobs/runners/lwr.py
+++ b/lib/galaxy/jobs/runners/lwr.py
@@ -533,6 +533,7 @@ class LwrComputeEnvironment( ComputeEnvironment ):
return parameter_value
rewrite, new_unstructured_path_rewrites = self.path_mapper.check_for_arbitrary_rewrite( parameter_value )
+ log.info("Checked for arbitrary rewrite of %s, do rewrite? %s" % ( parameter_value, rewrite ) )
if rewrite:
@jmchilton
jmchilton / gist:6e19d248002b1080e8ba
Created May 19, 2014 21:13
Circular Dependencies
galaxy.model.orm DEBUG 2014-05-19 16:00:55,046 psycopg2 egg successfully loaded for postgresql dialect
Traceback (most recent call last):
File "./scripts/paster.py", line 33, in <module>
serve.run()
File "/home/john/workspace/galaxy-central-demo/lib/galaxy/util/pastescript/serve.py", line 1049, in run
invoke(command, command_name, options, args[1:])
File "/home/john/workspace/galaxy-central-demo/lib/galaxy/util/pastescript/serve.py", line 1055, in invoke
exit_code = runner.run(args)
File "/home/john/workspace/galaxy-central-demo/lib/galaxy/util/pastescript/serve.py", line 220, in run
result = self.command()