Skip to content

Instantly share code, notes, and snippets.

View blahah's full-sized avatar

Rik Smith-Unna blahah

  • upward spiral ∞⟨X∴↯⟩∞
  • Bristol / Berlin / Nairobi
  • X @blahah404
View GitHub Profile
@blahah
blahah / markov.jl
Created August 4, 2014 11:43
Markov chain generator in Julia
# Type representing a Markov chain generator.
# It stores an array of the possible states in the chain,
# and a transition matrix defining the probabilities
# of moving from one state to another.
type MarkovGenerator
states::Array{Int}
transmat::Array{Float64}
end
# Given the current state, get the next state of a Markov chain
@blahah
blahah / dev_setup.sh
Last active August 29, 2015 14:05
OSX dev setup (wip)
# Ask for the administrator password upfront
sudo -v
# homebrew
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
brew doctor
# Ruby Version Manager & latest Ruby
\curl -sSL https://get.rvm.io | bash -s stable --ruby
source ~/.rvm/scripts/rvm
@blahah
blahah / quickscrape_provision.sh
Last active August 29, 2015 14:05
quickscrape Vagrant provisioning
# install basic tools
sudo apt-get install -y curl build-essential
# install NVM
curl https://raw.githubusercontent.com/creationix/nvm/v0.13.1/install.sh | bash
. /home/vagrant/.profile
# install Node.js
nvm install v0.10.30
nvm use 0.10
@blahah
blahah / .bashrc
Created August 19, 2014 23:08
bashrc pretty colours
set_prompt () {
Last_Command=$? # Must come first!
Blue='\[\e[01;34m\]'
White='\[\e[01;37m\]'
Red='\[\e[01;31m\]'
Green='\[\e[01;32m\]'
Reset='\[\e[00m\]'
FancyX='\342\234\227'
Checkmark='\342\234\223'
@blahah
blahah / plots.Rmd
Created August 20, 2014 14:58
Basic plotting of transrate results for varying read depth Trinity mouse assemblies
Transrate assembly and contig plots.
========================================================
Assemblies of mouse with 10, 20, 50 and 100 million reads.
# Assembly-level stats
## Load data
```{r}
@blahah
blahah / log.txt
Created September 10, 2014 17:13
ami2-poc run result
[WARNING] Assembly file: /home/vagrant/ami2-poc/target/ami2-poc-0.0.2-SNAPSHOT-bin is not a regular file (it may be a directory). It cannot be attached to the project build for installation or deployment.
[INFO]
[INFO] --- jdeb:1.3:jdeb (default) @ ami2-poc ---
Downloading: http://repo.maven.apache.org/maven2/javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar
Downloading: http://repo.maven.apache.org/maven2/com/google/guava/guava/10.0.1/guava-10.0.1.jar
Downloading: http://repo.maven.apache.org/maven2/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar
Downloaded: http://repo.maven.apache.org/maven2/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar (33 KB at 230.3 KB/sec)
Downloaded: http://repo.maven.apache.org/maven2/javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar (0 B at 0.0 KB/sec)
Downloaded: http://repo.maven.apache.org/maven2/com/google/guava/guava/10.0.1/guava-10.0.1.jar (1467 KB at 2242.2 KB/sec)
[INFO] Creating debian package: /home/vagrant/ami2-poc/target/ami2-poc_0.0.2~SNAPSHOT_all.deb
@blahah
blahah / setup_contentmine.sh
Created October 1, 2014 12:38
ContentMine EBI workshop VM setup script
## ContentMine VM setup script
echo password | sudo -S apt-get update -y
## Java 7
sudo apt-get install -y openjdk-7-jdk
sudo update-alternatives --config java
sudo update-alternatives --config javac
@blahah
blahah / unix.md
Created November 25, 2014 08:35
Unix for biologists

Title: Unix Primer for Biologists Authors: Keith Bradnam & Ian Korf Date: September 27, 2012 Web: unixandperl.com Address: Genome Center, UC Davis, Davis, CA, 95616

Unix and Perl Primer for Biologists

Keith Bradnam & Ian Korf

@blahah
blahah / entry.json
Created January 3, 2015 16:32
proposed bibJSON format for ContentMine catalogue
{
"type": "article",
"publisher": {
"name": "Public Library of Science (PLoS)"
},
"journal": {
"issn": "1932-6203",
"name": "PLoS ONE",
"volume": "1",
"issue": "5",
@blahah
blahah / game.rb
Last active August 29, 2015 14:16
Genome assembly game - basic version
#! /usr/bin/env ruby
# This is a game that helps people understand genome assembly. Given a string,
# it generates sequence reads giving perfect coverage of the string and with a
# fixed overlap. The idea is to print the generated reads, cut them out, and
# have learners assemble them by hand. Different difficulties can be
# demonstrated by using a string with repeats, low complexity, etc., to mimic
# real assembly problems, or by adjusting the parameters (overlap and number
# of fragments).