Skip to content

Instantly share code, notes, and snippets.

@pjbriggs
pjbriggs / Galactic-Engineer-GALAXY_SLOTS-trimmomatic-fragment.xml
Created April 22, 2015 12:01
Galactic Engineer/GALAXY_SLOTS: trimmomatic.xml fragment
...
<command interpreter="bash">trimmomatic.sh
-mx8G
-jar \$TRIMMOMATIC_DIR/trimmomatic-0.32.jar
#if $paired_end.is_paired_end
PE -threads \${GALAXY_SLOTS:-6} -phred33 $fastq_r1_in $paired_end.fastq_r2_in $fastq_out_r1_paired $fastq_out_r1_unpaired $fastq_out_r2_paired $fastq_out_r2_unpaired
#else
SE -threads \${GALAXY_SLOTS:-6} -phred33 $fastq_in $fastq_out
#end if
...
@pjbriggs
pjbriggs / boolean_test_issue.sh
Created May 8, 2015 13:38
Demonstrate issue with "boolean" parameter type behaving differently in tests compared with interactive usage.
#!/bin/sh
echo Values are $1 $2 > $3
@pjbriggs
pjbriggs / galaxy_boolean_test_issue2.sh
Last active August 29, 2015 14:21
Dummy Galaxy tool demonstrating problem with setting value of boolean parameter used as "control" variable in a conditional tag within tool tests
#!/bin/sh
echo Values are ${@:2} > $1
@pjbriggs
pjbriggs / Galactic-Engineer-nginx-conf-fragment-for-reports
Created June 2, 2015 13:54
Fragment of nginx conf file for exposing Galaxy report tool
http {
    ...
    upstream reports {
        server localhost:9001;
    }
    ...
    server {
       ...
        location ^~ /reports/ {
            proxy_pass  http://reports;
@pjbriggs
pjbriggs / Galactic-Engineer-nginx-conf-fragment-for-reports-with-auth
Created June 2, 2015 14:01
Fragment of nginx conf for exposing Galaxy reports including authentication
...
location ^~ /reports/ {
proxy_pass http://reports;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/galaxy-reports.htpasswd;
...
}
@pjbriggs
pjbriggs / history.py.diff
Created June 17, 2015 11:58
Patch to fix "Share history with user" function in galaxy-dist 15.05
diff -r c3cef260df88 lib/galaxy/webapps/galaxy/controllers/history.py
--- a/lib/galaxy/webapps/galaxy/controllers/history.py Fri May 15 15:20:17 2015 -0400
+++ b/lib/galaxy/webapps/galaxy/controllers/history.py Wed Jun 17 12:51:41 2015 +0100
@@ -899,7 +899,7 @@
for history_id in ids:
history_id = self.decode_id( history_id )
history = self.history_manager.get_owned( history_id, trans.user, current_history=trans.history )
- histories.append( )
+ histories.append( history )
return histories
@pjbriggs
pjbriggs / make_ceas_refseq_annotation.py
Last active August 29, 2015 14:23
Make a generic refSeq-based annotation file for CEAS program using fetchChromSizes and build_genomeBG. The resulting annotation can be used for test purposes but shouldn't be used for genuine analyses.
#!/usr/bin/env python
#
# Make generic CEAS annotation file for arbitrary genome build
#
# Needs the UCSC fetchChromSizes program plus build_genomeBG from CEAS
#
# Usage: make_ceas_refseq_annotation.py <GENOME>
#
import optparse
import os
@pjbriggs
pjbriggs / bedgraph_to_wig.py
Created June 19, 2015 16:16
Python script that converts a bedGraph format file to a wig file.
#!/usr/bin/env python
#
# Convert bedgraph file into wig format
#
# Based on perl script by Dave Tang
# http://davetang.org/wiki/tiki-index.php?page=wig
import optparse
import os
import gzip
@pjbriggs
pjbriggs / vsearch_clustering_tests.sh
Created July 2, 2015 15:04
Test scripts for vsearch functions, to generate example data for the vsearch Galaxy tools
#!/bin/sh
#
# Generate test outputs for clustering
#
# Existing test case (--cluster_fast)
vsearch \
--notrunclabels \
--cluster_fast BioMarKs5k.fsa.bz2 \
--maxrejects 2 \
--maxaccepts 1 \
@pjbriggs
pjbriggs / migrate_legacy_galaxy_config.sh
Created August 27, 2015 12:55
Script to move config (.ini and .xml) files from "legacy" Galaxy dist into 'config' dir
#!/bin/bash -e
#
# Migrate "legacy" config files in Galaxy distribution
#
# Check nothing is running
if [ ! -z "$(ls *.pid 2>/dev/null)" ] ; then
echo ERROR check you have stopped all Galaxy processes >&2
exit 1
fi
#