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 / gist:4060124
Created November 12, 2012 15:52
MSI Software Accounting Development
<h3>Development Setup for MSI Software Accounting Webapp</h3>
<p>Setup RVM, used to manage your ruby environment.
</p>
<pre>
%\curl -L https://get.rvm.io | bash -s
</pre>
<p>Configure your current shell session to use RVM.</p>
@jmchilton
jmchilton / softacct_development
Created November 12, 2012 15:52
MSI Software Accounting Development
<h3>Development Setup for MSI Software Accounting Webapp</h3>
<p>Setup RVM, used to manage your ruby environment.
</p>
<pre>
%\curl -L https://get.rvm.io | bash -s
</pre>
<p>Configure your current shell session to use RVM.</p>
@jmchilton
jmchilton / main.rst
Created November 16, 2012 05:50
Deploying Production Galaxy Environments with CloudBioLinux and CloudMan

Deploying Production Galaxy Environments with CloudBioLinux and CloudMan

Typically, CloudMan is used to spin up a dedicated Galaxy virtual cluster for a single user or small group on Amazon EC2. This document outlines methods for deploying customized Galaxy instances that are more suitable for production environments - these enhancements include enabling load balancing, external authentication, SSL, reporting, and taking advantage of external resources such as dedicated file and

@jmchilton
jmchilton / gist:4170802
Created November 29, 2012 18:00
cloning galaxy-central as a git repository
% wget https://raw.github.com/felipec/git/fc/remote/hg/contrib/remote-helpers/git-remote-hg
% mv git-remote-hg /place/on/path
% git clone hg::https://bitbucket.org/galaxy/galaxy-central
<display id="protvis_mzml" version="1.0.0" name="display with ProtVis">
<dynamic_links from_file="tool-data/protk_display_site.txt" skip_startswith="#" id="0" name="0">
<!-- Define parameters by column from file -->
<dynamic_param name="site_id" value="0"/>
<dynamic_param name="site_url" value="1"/>
<!-- We define url and params as normal, but values defined in dynamic_param are available by specified name -->
<url target_frame="galaxy_main">${site_url}/init_url?url=${mzml_file.qp}&amp;type=mzml${peptide_param.value}${spectrum_param.value}</url>
<param type="data" name="mzml_file" url="galaxy_${DATASET_HASH}.mzml" />
<param type="template" name="peptide" allow_override="True" />
<param type="template" name="peptide_param" strip="True">
@jmchilton
jmchilton / create_galaxy_users.py
Created January 7, 2013 15:07
Place in galaxy home directory and run to create users.
from scripts.db_shell import *
from galaxy.util.bunch import Bunch
from galaxy.security import GalaxyRBACAgent
bunch = Bunch( **globals() )
bunch.engine = engine
# model.flush() has been removed.
bunch.session = db_session
# For backward compatibility with "model.context.current"
bunch.context = db_session
security_agent = GalaxyRBACAgent( bunch )
diff --git a/cloudbio/galaxy/__init__.py b/cloudbio/galaxy/__init__.py
index 33e3e74..823e04c 100644
--- a/cloudbio/galaxy/__init__.py
+++ b/cloudbio/galaxy/__init__.py
@@ -367,6 +367,7 @@ def _install_nginx(env):
run("wget %s" % url)
run("tar xvzf %s" % os.path.split(url)[1])
with cd("nginx-%s" % version):
+ run("patch -p1 < ../nginx_tcp_proxy_module/tcp.patch")
run("./configure --prefix=%s --with-ipv6 %s "
@jmchilton
jmchilton / PeptideShaker
Last active May 2, 2016 20:30
Wrapper scripts for PeptideShaker and SearchGUI, just drop these scripts in your PeptideShaker or SearchGUI directories. Allows easy uniform access to programs regardless of current working directory, hides class name details.
#!/bin/bash
SOURCE="${BASH_SOURCE[0]}"
app_dir="$( dirname "$SOURCE" )"
while [ -h "$SOURCE" ]
do
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
app_dir="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
done
@jmchilton
jmchilton / gist:5030503
Created February 25, 2013 15:18
Modifying Galaxy's example_watch_folder.py for multi-file uploads. Assumes directory_ready(path) exists and indicates a directory is ready to be processed.
while 1:
# Watch in_folder, upload anything that shows up there to data library and get ldda,
# invoke workflow, move file to out_folder.
for fname in os.listdir(in_folder):
fullpath = os.path.join(in_folder, fname)
if os.path.isdir(fullpath) and directory_ready(fullpath):
directory_files = [os.path.join(fullpath, subdir_fname) for subdir_fname in os.path.listdir(fullpath)]
data = {}
data['folder_id'] = library_folder_id
data['file_type'] = 'auto'
@jmchilton
jmchilton / MZmine
Created April 27, 2013 19:48
MZmine Linux startup script
#!/bin/bash
# Enhanced Linux MZmine startup script, works as symbolic link.
# The HEAP_SIZE variable defines the Java heap size in MB.
# That is the total amount of memory available to MZmine 2.
# By default we set this to the half of the physical memory
# size, but feel free to adjust according to your needs.
HEAP_SIZE=`free -m | awk '/Mem:/ {print int($2 / 2)}'`