Skip to content

Instantly share code, notes, and snippets.

@mvdbeek
mvdbeek / gist:6c46f2a996fc717bfd92
Created August 21, 2015 13:16
Can't locate local/lib.pm in @inc
mkdir -p ~/src/test/test_install_dir
cd ~/src/test/
wget http://www.cpan.org/authors/id/A/AP/APEIRON/local-lib-1.008009.tar.gz
tar xfvz local-lib-1.008009.tar.gz
cd local-lib-1.008009
export INSTALL_DIR=~/src/test/test_install_dir
export HOME=$INSTALL_DIR; export PATH=$INSTALL_DIR/bin/:$PATH; perl Makefile.PL --bootstrap=$INSTALL_DIR/local-lib/ --no-manpages
make install
echo "test local-lib/perl5"
#This should fail with Can't locate local/lib.pm in @INC
@mvdbeek
mvdbeek / samtools_sort.diff
Created September 18, 2015 10:47
samtools_sort.diff
diff --git a/lib/galaxy/datatypes/dataproviders/dataset.py b/lib/galaxy/datatypes/dataproviders/dataset.py
index 1fe1868..c34cd42 100644
--- a/lib/galaxy/datatypes/dataproviders/dataset.py
+++ b/lib/galaxy/datatypes/dataproviders/dataset.py
@@ -633,6 +633,7 @@ class SamtoolsDataProvider( line.RegexLineDataProvider ):
command.extend( self.to_options_list( options_string, options_dict ) )
command.append( self.dataset.file_name )
command.extend( regions )
+ command.extend( ['| samtools sort -'])
return command
@mvdbeek
mvdbeek / fix_samtools_twilltest.diff
Created September 18, 2015 11:40
fix planemo shed_test when comparing bam files.
diff --git a/test/base/twilltestcase.py b/test/base/twilltestcase.py
index bced847..e2009f5 100644
--- a/test/base/twilltestcase.py
+++ b/test/base/twilltestcase.py
@@ -2487,9 +2487,9 @@ class TwillTestCase( unittest.TestCase ):
temp_local = tempfile.NamedTemporaryFile( suffix='.sam', prefix='local_bam_converted_to_sam_' )
fd, temp_temp = tempfile.mkstemp( suffix='.sam', prefix='history_bam_converted_to_sam_' )
os.close( fd )
- command = 'samtools view -h -o "%s" "%s"' % ( temp_local.name, local_name )
+ command = 'samtools sort -o "%s" - |samtools view -h -o "%s" -' % ( local_name, temp_local.name )
@mvdbeek
mvdbeek / gist:687dff5be528b8ec3882
Created October 7, 2015 12:53
broken workflow import
{
"a_galaxy_workflow": "true",
"annotation": "",
"format-version": "0.1",
"name": "ChIP-seq analysis",
"steps": {
"0": {
"annotation": "",
"id": 0,
"input_connections": {},
@mvdbeek
mvdbeek / tool_dependencies.xml
Created October 11, 2015 14:48
Pixman actions_group problems.
<?xml version="1.0"?>
<tool_dependency>
<package name="libpng" version="1.6.7">
<repository name="package_libpng_1_6_7" owner="iuc" prior_installation_required="True" />
</package>
<package name="pixman" version="0.32.6">
<install version="1.0">
<actions_group>
<actions architecture="x86_64" os="linux">
<action type="download_by_url" sha256sum="3dfed13b8060eadabf0a4945c7045b7793cc7e3e910e748a8bb0f0dc3e794904">http://cairographics.org/releases/pixman-0.32.6.tar.gz</action>
@mvdbeek
mvdbeek / khmer_test_output.html
Last active November 9, 2015 16:02
khmer failed test
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Tool Test Results (powered by Planemo)</title>
<!-- Bootstrap -->
<style>/*!
@mvdbeek
mvdbeek / maas_in_lxc.MD
Created November 25, 2015 19:02
Installing maas in trusty 14.04

What works:

Ubuntu-14.04 LTS container in LXC container:

Activate trusty-backports in /etc/apt/sources.list.d/trusty-backports

deb http://fr.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://fr.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
@mvdbeek
mvdbeek / fontconfig.diff
Created December 4, 2015 11:00
may or may not be needed to compile R ...
diff --git a/fc-cache/fc-cache.c b/fc-cache/fc-cache.c
index 99e0e9f..bf3b6b4 100644
--- a/fc-cache/fc-cache.c
+++ b/fc-cache/fc-cache.c
@@ -187,13 +187,8 @@ scanDirs (FcStrList *list, FcConfig *config, FcBool force, FcBool really_force,
if (!cache)
{
- if (!recursive)
- cache = FcDirCacheRescan (dir, config);
@mvdbeek
mvdbeek / ansible_maas_dynamic_inventory.py
Created December 16, 2015 10:12
Ansible maas 1.9 inventory
#!/usr/bin/env python
"""
Ubuntu MaaS External Inventory Script for MaaS Tower
====================================================
This script fetches hosts data for Ansible from Ubuntu MaaS, using Tags to identify groups and roles. It is expected
that the script will be copied to Tower within the new Inventory Scripts dialog offered within the interface, where
it will be passed the `--list` argument to invoke the dynamic inventory process.
@mvdbeek
mvdbeek / run_postgresql.sh
Created January 4, 2016 17:30
example script for running postgresql controlled by supervisor on real bootable machines
#!/bin/bash
# This script is run by Supervisor to start PostgreSQL 9.1 in foreground mode
function shutdown()
{
echo "Shutting down PostgreSQL"
kill $(cat /var/lib/postgresql/9.3/main/postmaster.pid)
exit 0
}