This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from scipy.spatial.distance import * | |
from scipy.cluster.hierarchy import * | |
import pandas as pd | |
import numpy | |
import matplotlib as plt | |
from matplotlib.pylab import figure | |
import pylab as pl | |
import pp | |
def num_clusters(hc, d): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## {{{ http://code.activestate.com/recipes/578175/ (r1) | |
### hierarchical_clustering.py | |
#Copyright 2005-2012 J. David Gladstone Institutes, San Francisco California | |
#Author Nathan Salomonis - [email protected] | |
#Permission is hereby granted, free of charge, to any person obtaining a copy | |
#of this software and associated documentation files (the "Software"), to deal | |
#in the Software without restriction, including without limitation the rights | |
#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
#copies of the Software, and to permit persons to whom the Software is furnished |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def chunk_seq(seq_name, sequence, chunk_size, chunk_increment): | |
""" | |
Chunk up a sequence and return a list of tuples with the chunked up | |
sequences and new sequence names with the position of the chunk in the | |
original sequence. | |
Args: | |
seq_name: Sequence name. | |
sequence: Nucleotide or amino acid sequence that is to be chunked up. | |
chunk_size: Size of chunks (e.g. 30 bp) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*coursera dark CSS style*/ | |
/*URL on domain: coursera.org*/ | |
a { | |
color: rgb(140, 178, 228) !important; | |
} | |
body,.row-fluid .span9,.row-fluid .span3,.row-fluid, div, li, ul, ol, .course-navbar-list .course-navbar-item.active a { | |
background-color: rgb(31, 31, 31) !important; | |
color: rgb(170,170,170) !important; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*feedly.com dark CSS theme*/ | |
.placeholder{ | |
visibility: hidden !important; | |
} | |
.area,.summary, div, .light { | |
background-color: rgb(30,30,30) !important; | |
color: rgb(200,200,200) !important; | |
} | |
a { | |
color: #78B7F5 !important; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Printing stack trace and continuing after error occurs in R | |
# http://stackoverflow.com/questions/1975110/printing-stack-trace-and-continuing-after-error-occurs-in-r | |
# Bob Albright | |
# I wrote this code about a week ago to help me track down errors that come primarily from non-interactive R sessions. It's still a little rough, but it prints a stack trace and continues on. Let me know if this is useful, I'd be interested in how you would make this more informative. I'm also open into cleaner ways to get this information. | |
options(warn = 2, keep.source = TRUE, error = | |
quote({ | |
cat("Environment:\n", file=stderr()); | |
# TODO: setup option for dumping to a file (?) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@article{olson_limited_2007, | |
title = {Limited genetic diversity in \emph{{Salmonella enterica}} Serovar {Enteritidis} {PT13}}, | |
volume = {7}, | |
copyright = {2007 Olson et al; licensee {BioMed} Central Ltd.}, | |
issn = {1471-2180}, | |
url = {http://www.biomedcentral.com/1471-2180/7/87/abstract}, | |
doi = {10.1186/1471-2180-7-87}, | |
abstract = {Salmonella enterica serovar Enteritidis has emerged as a significant foodborne pathogen throughout the world and is commonly characterized by phage typing. In Canada phage types ({PT)} 4, 8 and 13 predominate and in 2005 a large foodborne {PT13} outbreak occurred in the province of Ontario. The ability to link strains during this outbreak was difficult due to the apparent clonality of {PT13} isolates in Canada, as there was a single dominant pulsed-field gel electrophoresis ({PFGE)} profile amongst epidemiologically linked human and food isolates as well as concurrent sporadic strains. The aim of this study was to perform comparative genomic hybridization ({CGH)}, {DNA} sequen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@article{kruczkiewicz_mist, | |
title = {{MIST}: a tool for rapid \emph{in silico} generation of molecular data from bacterial genome sequences}, | |
author = {Kruczkiewicz, Peter and Mutschall, Steven and Barker, Dillon and Thomas, James and Van Domselaar, Gary and Gannon, Victor P.J. and Carrillo, Catherine D. and Taboada, Eduardo N.}, | |
year = {2013}, | |
location = {Barcelona, Spain}, | |
pages = {316--323}, | |
isbn = {978-989-8565-35-8}, | |
publisher = {SCITEPRESS}, | |
journal = {Proceedings of Bioinformatics 2013: 4th International Conference on Bioinformatics Models, Methods and Algorithms} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*dark theme CSS for NCIX.com*/ | |
div, table, b, td, tr, form, h1, h2, h3, h4, h5, input, select, span { | |
background: none !important; | |
} | |
div, table, b, td, tr, form, h1, h2, h3, h4, h5, textarea, input, select, span { | |
color: rgb(170,170,170) !important; | |
background-color: rgb(30,30,30) !important; | |
} |