Skip to content

Instantly share code, notes, and snippets.

View avalind's full-sized avatar

Anders Valind avalind

  • Malmö, Sweden
View GitHub Profile
@avalind
avalind / msmut_notes.md
Last active February 23, 2023 07:23
MSMutect notes for running

MSMutect notes

I've run in to the following issues while trying to get MSMutect to work:

  1. the path to the data folder in shell_for_all.sh needs to be absolute.
  2. make a symlink with link name phobos in bin, pointing to the correct phobos binary.
  3. bowtie2 needs to have its indices specified by the -x flag, so this needs to be added to the awk-oneliner invoking bowtie2 for each repeat.
  4. Even when adding the -x flag bowtie2 complains about some missing reference files (using the Normal.bam) test data.
@avalind
avalind / fasta.py
Created July 28, 2015 17:01
Simple no-bullshit Fasta reader
import fileinput
def fastaparse():
fasta = {}
current_id = None
buf=""
for line in fileinput.input():
if line[0] == ">":
if current_id is None:
current_id = line[1:].strip()
@avalind
avalind / boxplot
Created May 8, 2015 20:53
For box plots of expression levels when there are a very small number of samples for one factor.
generate.dataset <- function() {
return(data.frame(
ccsk=runif(20, 2.5, 5.0),
wt=runif(20, 1.5, 4.5),
ak=runif(20, 1.0, 1.25),
fk=runif(20, 0.5, 1.0)))
}
build.plot <- function() {
synthetic <- generate.dataset()

Keybase proof

I hereby claim:

  • I am avalind on github.
  • I am andersvalind (https://keybase.io/andersvalind) on keybase.
  • I have a public key whose fingerprint is 8760 6360 B509 DE1F 478B 0697 FE35 8E40 593B 0093

To claim this, I am signing this object:

@avalind
avalind / debruijn.py
Created August 11, 2012 21:48
Simple Debruijn graph
#!/usr/bin/env python
# For simplicity, not efficiency.
class Graph(object):
def __init__(self):
self.nodes = {}
def add_node(self, n):
if n not in self.nodes:
self.nodes[n] = []