Skip to content

Instantly share code, notes, and snippets.

View meren's full-sized avatar

A. Murat Eren (Meren) meren

View GitHub Profile
library(ggplot2)
library(reshape)
library(reshape2)
library(RColorBrewer)
library("vegan")
library(gtools)
library(grid)
library(gridBase)
library(gridExtra)
library(Biostrings)
import sys
import Oligotyping.lib.fastalib as u
fasta = u.SequenceSource(sys.argv[1])
output = u.FastaOutput(sys.argv[2])
while fasta.next():
if fasta.pos % 10000 == 0:
sys.stdout.write('\rreads processed so far: %d' % (fasta.pos))
library(grid)
library(maps)
require(ggmap)
library(vegan)
require(mapproj)
library(ggplot2)
library(maptools)
library(pheatmap)
library(gridExtra)
@meren
meren / test.py
Last active August 29, 2015 14:05
from cogent.align.algorithm import nw_align as nw_align_cogent
from skbio.alignment import global_pairwise_align_nucleotide as nw_align_scikit
seq_1 = 'ATCGATCGATCG'
seq_2 = 'ATCGATATCGATCG'
print "Sequences: "
print " %s" % seq_1
print " %s" % seq_2

Keybase proof

I hereby claim:

  • I am meren on github.
  • I am meren (https://keybase.io/meren) on keybase.
  • I have a public key whose fingerprint is C0F7 769C D952 09CF 8D6B CC90 BF7E 7D06 B8C1 373C

To claim this, I am signing this object:

#!/usr/bin/env python
# -*- coding: utf-8
# Copyright (C) 2014, A. Murat Eren
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option)
# any later version.
#
echo 'export PATH="/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"' > ~/.bash_profile
source ~/.bash_profile
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2010 - 2012, A. Murat Eren
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option)
# any later version.
#
@meren
meren / wait_for_cluster.py
Created March 11, 2015 06:30
Don't move to the next line in a batch operation until all jobs are done on the cluster, or, "poor man's hold"
import os
import sys
import time
import xml.dom.minidom
import string
import getpass
def still_running(job_name, job_owner):
f=os.popen('qstat -u \* -xml -r')
#!/bin/bash
set -e
for f in `cat 00_FILES`
do
d=`date`
echo "[$d] working on $f ..."
svr_assign_to_dna_using_figfams < $f > svr_assign_to_dna_using_figfams.txt
papi-gen-annotation-database -f $f -o ANNOTATION.db