Skip to content

Instantly share code, notes, and snippets.

Adam Wespiser adamwespiser

Block or report user

Report or block adamwespiser

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@adamwespiser
adamwespiser / runJob.pl
Created Apr 19, 2012
hpcc automated job running
View runJob.pl
#!/usr/bin/perl
use warnings;
use Getopt::Long;
=begin comment <runJob.pl notes>
The purpose of this script is to make it very easy to run single use jobs on the
cluster by generating a one time use script that is submitted after creation.
Options:
-i input command e.g. "muscle -in ensemblSeqs.fa -out ensembl.aln (required)
View .bashrc
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
export PATH=/home/wespisea/bin/hmmer/binaries:$PATH:/share/bin:/home/wespisea/bin/blast/bin
alias anto="ssh adam@anto.umassmed.edu"
# User specific aliases and functions
alias pf="cd /home/wespisea/work/research/researchProjects/proteins/patchFinder"
View .bashrc
PS1="\!@local:\W$ "
export CLICOLOR=true
export PATH=$PATH:/Users/dcaffrey/bin:/usr/local/mysql-5.1.41-osx10.5-x86/bin:/Users/dcaffrey/programs/muscle3.6_src:/Users/dcaffrey/programs/ViennaRNA-1.8.3/bin:/Users/dcaffrey/programs/blast-2.2.14/bin:/Users/dcaffrey/programs/hmmer-3.0-macosx-intel/binaries:/Users/dcaffrey/programs/wise2.2.0/src/bin:/Users/dcaffrey/programs/clustalw-2.0.12-macosx/:/Users/dcaffrey/programs/scwrl4:/Users/dcaffrey/programs/meme/bin:/usr/local/mysql/bin/:/Users/dcaffrey/programs/mrbayes/mrbayes-3.1.2:/Users/dcaffrey/programs/usr/local/bin:/Users/dcaffrey/programs/ligplot/hbplus:/Users/dcaffrey/programs/glam-src:/Users/dcaffrey/programs/rosetta3.1Bundles/rosetta_source/bin:/Users/adam/work/scripts/other:/Users/adam/work/scripts/ensembl/modules/:/Users/adam/bin:/Users/adam/work/scripts/other/modules
#PERL5LIB=${PERL5LIB}:/Users/dcaffrey/programs/bioPerl/bioperl-live:/Users/dcaffrey/programs/ensemblApi/ensembl/modules:/Users/dcaffrey/programs/ensemblApi/ensembl-compara/modules:/Users/dcaff
@adamwespiser
adamwespiser / joshua.py
Last active Oct 4, 2015
A basic python script that plays a human player in a game of tic tac toe
View joshua.py
#!/usr/bin/python
# Copyright Adam Wespiser, 2012
# 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 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@adamwespiser
adamwespiser / core.clj
Created May 21, 2012
Turing Machine Implementation in Clojure
View core.clj
(ns turing.core)
;; define moves
;; delta(state, symbol) -> (new state, new symbol, direction of movement)
(def m {[:q0 1] [:q0 1 1],
[:q0 0] [:q1 1 1],
[:q1 1] [:q1 1 1],
[:q1 :B] [:q2 :B -1],
[:q2 1] [:q3 0 -1],
[:q3 1] [:q3 1 -1],
@adamwespiser
adamwespiser / backUpDir.pl
Created Sep 12, 2012
perl script to recursively copy a folder data information(kinect project)
View backUpDir.pl
#!/usr/bin/perl
use strict;
use warnings;
my $initials = "AW";
my $src = $ARGV[0];
my $trg = $ARGV[1];
$trg =~ s/\/$//g;
@adamwespiser
adamwespiser / Fasta.py
Created Nov 13, 2012
Fasta module for python
View Fasta.py
class Dna:
''' Object representing a FASTA record. '''
def __init__(self, header, sequence):
self.head = header
self.seq = sequence
def __repr__(self):
return '[HTML]' % (self.head)
def __str__(self, separator=''):
return '>%s\n%s' % (self.head, separator.join(self.seq))
def __len__(self):
@adamwespiser
adamwespiser / awSeqLib.py
Created Nov 13, 2012
Solution to rosalind's 'GRPH' problem
View awSeqLib.py
class Dna:
''' Object representing a FASTA record. '''
def __init__(self, header, sequence):
self.head = header
self.seq = sequence
def __str__(self, separator=''):
return ">{0}\n{1}".format(self.head, separator.join(self.seq))
def __len__(self):
return len(''.join(self.seq))
@adamwespiser
adamwespiser / README
Created Nov 17, 2012
Solution to rosalind.info's 'long' problem
View README
Problem: Given a set of string, find the shortest common superstring such that every string is a subset of the superstring.
http://rosalind.info/problems/long/ is the location of the problem
http://www.cs.hunter.cuny.edu/~saad/courses/compbio/lectures/lecture15.pdf is a good resource on how to solve the problem, also
"Approximation Algorithms" by Vazirani.
Usage: python long.py --file [input seq file]
@adamwespiser
adamwespiser / README
Created Nov 18, 2012
Solution to rosalind's "corr" problem
View README
Solution to rosalind's "CORR" problem.
http://rosalind.info/problems/corr/
The problem is:
Given a collection of reads(same size), a read is either:
1) Correct, and is the same as another read or its reverse trans
2) Incorrect by a point mutation, and the thus one base pair difference between the read and a correct read. (Hamming distance = 1)
report incorrect reads and their correct counterparts.
There is a strong assumption that a read must be either correct or incorrect, and that all incorrect reads map to at least one correct read.
You can’t perform that action at this time.