Skip to content

Instantly share code, notes, and snippets.

@idot
idot / toIllu.py
Created October 10, 2011 16:52
converts 1.8+ illumina qualities somehow to 1.5+
#!/usr/bin/env python
def toIllu(c):
"""returns the 1.5 value of phred+33
>>> [toIllu(ord(n)) for n in["!",'"',"#","$","H","I","J"]]
['B', 'B', 'B', 'C', 'g', 'h', 'h']
"""
if c < 36:
return "B"
elif c > 73:
@idot
idot / tikz2pdf.py
Created July 26, 2011 10:05
converts .tikz to pdf files
#!/usr/bin/env python
#
# Copyright (c) 2007, Hans Meine <hans_meine@gmx.net>
# All rights reserved.
#
# This is licensed according to the new BSD license.
# Please send patches / comments, I would be happy about any feedback.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@idot
idot / build tophat
Created July 12, 2011 14:35
build tophat in own folder
#similar to brentp http://biostar.stackexchange.com/questions/4885/installation-of-tophat-1-1-4
* in samtools download mkdir lib include/bam bin
* cp libbam.a lib; *.h include/bam ; samtools bin
tophat:
./configure --with-bam=/path/to/samtools/samtools-0.1.13 --prefix /path/to/tophat/checkout/tophat/tophat.git
make && make install
will create tophat binaries in tophat.git/bin
@idot
idot / igb_bed.xml
Created April 26, 2011 13:06
Display files from galaxy in IGB (needs copy of synonyms.txt)
<display id="igb_bed" version="1.0.0" name="display in ">
<link id="igb_bed" name="IGB">
<url>http://localhost:7085/UnibrowControl?version=${buildversion}&amp;${position}&amp;loadresidues=false&amp;feature_url_0=${bed_file.url}&amp;sym_name_0=${thenicename}&amp;sym_method_0=${bed_file.url}&amp;sym_bg_0=0xFFFFFF&amp;graph_show_label_0=true&amp;graph_show_axis_0=true&amp;graph_minvis_0=0.0&amp;graph_maxvis_0=100&amp;graph_float_0=false&amp;graph_style_0=Bar&amp;query_url=${bed_file.url}&amp;server_url=galaxy</url>
<param type="data" name="bed_file_for_name" viewable="False"/>
<param type="template" name="thenicename" viewable="False" strip="True">
#import re
#set nm=$bed_file_for_name.name
${re.sub('\W',"_",nm)}
</param>
<param type="data" name="bed_file" url="${thenicename}_${DATASET_HASH}.bed" strip_https="True" />
class InputActor(latch: CountDownLatch, outputStream : OutputStream) extends Actor {
private val log = LoggerFactory getLogger(Popen getClass)
private val writer = new PrintWriter(outputStream)
def act(){
react{
case null => {
ControlUtil.closeInsulated(writer)
latch.countDown
#!/bin/sh
cd `dirname $0`
python -ES ./importer/importer.py universe_wsgi.ini $@