This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://help.ubuntu.com/10.04/serverguide/C/jeos-and-vmbuilder.html | |
sudo vmbuilder kvm ubuntu --hostname cloudbiolinux.local --suite lucid \ | |
--flavour virtual --arch amd64 -o --libvirt qemu:///system \ | |
--user ubuntu --pass password \ | |
--addpkg unattended-upgrades --addpkg acpid --addpkg openssh-server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import subprocess | |
from celery.task import task | |
# Task overlapping: | |
# lvm_create --> archive --> transfer(delayed?) --> (verify) --> lvm_destroy | |
# basecalling --> fastq transfer (8h ?) | |
# Without LVM: | |
# archive --> transfer --> verify |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Small logbook snippet addressing some confusion on record injection | |
import logbook | |
handler = logbook.MailHandler("[email protected]", ['[email protected]'], | |
format_string=u'''Subject: [BCBB] {record.extra[run]} \n\n {record.message}''', level='INFO', bubble = True) | |
log = logbook.Logger("mailtest.log") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import csv | |
import sys | |
import os | |
ss_reader = csv.DictReader(open(sys.argv[1], 'rU')) | |
ss_writer = csv.DictWriter(open(os.path.splitext(sys.argv[1])[0]+"_a.csv", 'w'), ss_reader.fieldnames) | |
ss_writer.writerow(dict((fn,fn) for fn in ss_reader.fieldnames)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Generates a TAR archive while computing MD5 checksum for each file. | |
# From VeriTAR: http://www.g-loaded.eu/2007/12/01/veritar-verify-checksums-of-files-within-a-tar-archive/ | |
DATASET_PATH=`readlink -f $1` | |
DATASET=`basename $DATASET_PATH` | |
EXCLUDE_FILES="--exclude .DS_Store --exclude .AppleDouble" | |
echo "Creating TAR + MD5 for dataset: $DATASET" | |
tar -cvpf $DATASET.tar $DATASET_PATH $EXCLUDE_FILES \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env python | |
import os | |
import logging | |
import glob | |
import random | |
from collections import * | |
fters = defaultdict(set) | |
all = set(["%04d.filter" % x for x in range(1, 70)]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
DATASET=" | |
SRC="" | |
DST="" | |
if [ -d ${SRC}${DATASET} ]; then | |
echo "Copying ${SRC}${DATASET} into $DST..." | |
chown -R $USER:uppmax ${SRC}${DATASET} | |
rsync -a ${SRC}${DATASET} ${DST} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import flickrapi | |
import datetime | |
import os | |
import shutil | |
import subprocess | |
api_key = 'SETME!!!' | |
api_secret = 'SETME!!!' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# http://rt.com/news/oxfam-report-global-inequality-357/ | |
# http://networkx.github.com/documentation/latest/reference/generated/networkx.generators.random_graphs.barabasi_albert_graph.html | |
import networkx as nx | |
import matplotlib.pyplot as plt | |
g = nx.Graph() | |
ba = nx.barabasi_albert_graph(15, 5) | |
er = nx.erdos_renyi_graph(15, 0.15) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -ru simNGS.orig/src/intensities.c simNGS/src/intensities.c | |
--- simNGS.orig/src/intensities.c 2011-11-14 13:04:17.000000000 +0200 | |
+++ simNGS/src/intensities.c 2013-04-24 15:29:40.100739000 +0300 | |
@@ -356,7 +356,7 @@ | |
ints->x[NBASE*i+seq.elt[i]] += lambda; | |
} else { | |
uint32_t j = i-seq.nelt; | |
- if(j>=0 && j<adapter.nelt && NUC_AMBIG != adapter.elt[j]){ | |
+ if(j<adapter.nelt && NUC_AMBIG != adapter.elt[j]){ | |
ints->x[NBASE*i+adapter.elt[j]] += lambda; |
OlderNewer