Skip to content

Instantly share code, notes, and snippets.

View audy's full-sized avatar
🔬

Austin Richardson audy

🔬
View GitHub Profile
@audy
audy / sdi.rb
Created February 12, 2014 20:00
#!/usr/bin/env ruby
#
# Compute Shannon Diversity Index from a CSV file
# Input has samples as columns, variables as rows
#
#
# (c) 2014 Austin G. Davis-Richardson
# LICENSE: MITv3
@audy
audy / keybase.md
Created March 15, 2014 14:18
keybase.md

Keybase proof

I hereby claim:

  • I am audy on github.
  • I am audy (https://keybase.io/audy) on keybase.
  • I have a public key whose fingerprint is ECAA 9A28 758A BB1F 77CD 2299 6707 68C1 407B E56C

To claim this, I am signing this object:

@audy
audy / uncertain pandas.ipynb
Created April 9, 2014 12:04
error propagation using Pandas and Uncertainties
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@audy
audy / fixrank_bacteroides-sequences.fasta_classified
Created April 23, 2014 20:59
rdp results for greengenes bacteroides
Classifier: RDP Naive Bayesian rRNA Classifier Version 2.6, Sep 2013
Taxonomical Hierarchy: RDP 16S rRNA training set 9
Query File: bacteroides-sequences.fasta
Submit Date: Wed Apr 23 16:53:26 EDT 2014
Confidence threshold (for classification to unclassified_"Porphyromonadaceae" ONLY): 80%
Symbol +/- indicates predicted sequence orientation
821498;+;Bacteria;100%;"Bacteroidetes";100%;"Bacteroidia";100%;"Bacteroidales";100%;"Porphyromonadaceae";98%;Tannerella;65%
729992;+;Bacteria;100%;"Bacteroidetes";100%;"Bacteroidia";100%;"Bacteroidales";100%;"Porphyromonadaceae";100%;Dysgonomonas;62%
637013;+;Bacteria;100%;"Bacteroidetes";100%;"Bacteroidia";100%;"Bacteroidales";100%;"Porphyromonadaceae";100%;Dysgonomonas;60%
@audy
audy / index.js
Created May 7, 2014 17:45
requirebin sketch
var shell = require('mesh-viewer')();
var vport = require('gl-viewport')(shell, { viewMode: 'ortho' });
window.addEventListener('keydown', function (ev) {
if (String.fromCharCode(ev.which) === 'P') {
var mode = vport.viewMode === 'ortho' ? 'perspective' : 'ortho';
vport.setViewMode(mode);
}
});
@audy
audy / example.R
Last active August 29, 2015 14:01
R vs. Python
#!/usr/bin/env Rscript
foo
file_to_disk = './tmp/large_disk.vdi'
Vagrant::Config.run do |config|
config.vm.box = 'base'
config.vm.customize ['createhd', '--filename', file_to_disk, '--size', 500 * 1024]
config.vm.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', file_to_disk]
end
@audy
audy / magrittr-ordination.R
Created July 2, 2014 13:34
Plot an ordination using magrittr and phyloseq
#!/usr/bin/env Rscript
library(phyloseq)
library(magrittr)
data(GlobalPatterns)
GlobalPatterns %>%
ordinate('NMDS', 'bray') %>%
plot_ordination(GlobalPatterns, ., type='split', color='Phylum', label='SampleType')
@audy
audy / findreplace.rb
Created July 29, 2014 14:36
find replace strings in a text file given a CSV of: target,replacement
#!/usr/bin/env ruby
require 'csv'
translation = CSV.read(ARGV[0])
translation.map! { |x| [/#{x[0]}/, x[1]] }
d = File.read('/dev/stdin')