Skip to content

Instantly share code, notes, and snippets.

View kdm9's full-sized avatar
💭
Remind me if I don't respond

Dr. K. D. Murray kdm9

💭
Remind me if I don't respond
View GitHub Profile
@kdm9
kdm9 / fasta_translate.py
Last active December 12, 2015 08:59
Translate script for Nader
from Bio import SeqIO
input_file = "test.fasta"
output_file = "protein.fasta"
input_file_reader = SeqIO.parse(open(input_file), "fasta")
output_file_writer = open(output_file, "w")
translated_seqs = []
@kdm9
kdm9 / caroline_plot
Created September 10, 2013 03:42
Plot for caroline
matplot(..., ylab=parse(text="VWC (m^3*/m^3*)"))
@kdm9
kdm9 / fastqc.sh
Last active August 29, 2015 13:56
Pete fastqc
#!/bin/bash
set -e
set -x
if [ $# -ne 1 ]
then
echo "USAGE: fastqc.sh SAMPLENAME"
fi
sample=$1
@kdm9
kdm9 / csv2latex
Created April 4, 2014 03:53
Convert csv to latex table, the MEGA hacky way.
sed -e 's/,/ \& /g' -e 's/$/ \\\\/g' <csv >table.latex
def write_timestream(self, image):
assert(isinstance(image, TimeStreamImage))
fn = get_filename(image)
write_image(fn, image)
from skimage.io import imread
import cv2
path = ""
arr = imread(path, plugin="freeimage")
print arr
print arr.shape
arr = cv2.imread(path)
print arr
print arr.shape

Keybase proof

I hereby claim:

  • I am kdmurray91 on github.
  • I am daube (https://keybase.io/daube) on keybase.
  • I have a public key whose fingerprint is 656C 0632 1EAB 2C3F 3837 9767 17C2 8EB1 A4B4 EE6A

To claim this, I am signing this object:

@kdm9
kdm9 / setup_r.R
Created July 31, 2014 05:40
Ben R setup
install.packages(c("methods", "Rcpp", "devtools", "ape"))
source("http://bioconductor.org/biocLite.R")
biocLite()
biocLite("GenomicRanges")
biocLite("Biobase")
biocLite("rhdf5")
install_github("vsbuffalo/tasselr")
install.packages("seqinr",repos = "http://cran.csiro.au/")
install.packages("phangorn",repos = "http://cran.csiro.au/")
#include <seqan/seq_io.h>
int main(int argc, char **argv)
{
std::string id, seq, qual;
if (argc < 2) {
return 1;
}
#include <seqan/seq_io.h>
using namespace seqan;
int main(int argc, char **argv)
{
std::string id, seq, qual;
if (argc < 2) {
return 1;