Skip to content

Instantly share code, notes, and snippets.

View jrherr's full-sized avatar
💭
Probably working

Josh Herr jrherr

💭
Probably working
View GitHub Profile
@RaiaN
RaiaN / get_16S.sh
Created August 25, 2015 11:51
This script allows to get 16S rrna sequence from .fna and .gff files
#!/bin/bash
gffs=`ls -1 | grep -E "*.gff" | sort`
RNA_SUFFIX=".rnaseqs.gff"
mkdir 16s
echo "Cleaning..."
rm *rnaseq*
rm *16s*
rm *.fai
@roblanf
roblanf / genome_plots.r
Last active September 4, 2016 09:23
Make plots about genome sequencing, size, and gene content
source("http://bioconductor.org/biocLite.R")
biocLite("genomes")
library(genomes)
library(ggplot2)
valid <- c("released", "created", "submitted")
data(proks)
update(proks)
@sckott
sckott / search_download.md
Last active August 29, 2015 14:26
occ_search and occ_download

to get similar results for GBIF search and download APIs

Load rgbif

library("rgbif")

occ_search() method

@0x0dea
0x0dea / process_gsub.rb
Created April 26, 2015 23:08
Process.gsub lets you search and replace within your process's live memory!
def Process.gsub pat, sub
mem = File.open('/proc/self/mem', 'r+')
maps = File.open('/proc/self/maps')
maps.each do |map|
from, to, perms, offset = map.scan(/(\h+)-(\h+) (\S+) (\h+)/)[0]
if perms['rw']
from, to = [from, to].map { |addr| addr.hex + offset.hex }
data = mem.tap { |m| m.seek from }.read(to - from) rescue next
@ttscoff
ttscoff / voices.txt
Created April 20, 2015 20:48
Voices available to say command on OS X 10.10.3
# Voices available to `say` on OS X
# "*" indicates new additions since 10.8
Agnes (en_US)
Albert (en_US)
Alex (en_US)
*Alice (it_IT)
*Alva (sv_SE)
*Amelie (fr_CA)
*Anna (de_DE)
## Quick attempt to ggplot-i-fy the heatmap post seen here: https://biomickwatson.wordpress.com/2015/04/09/recreating-a-famous-visualisation/
measles_cases <- read.csv("../data/MEASLES_Cases_1909-2001_20150409092603.csv", skip=2, stringsAsFactors=FALSE)
## From blog post
measles_cases[measles_cases=="-"] <- 0
## not sure what is happening in the last col
measles_cases <- measles_cases[,-62]
for (i in 2:61) {
@lindenb
lindenb / gnuplot.txt
Created March 25, 2015 16:16
for each BAM plot number of reads mapping chr22 using Gnuplot + linux pipe:
$ (find ./ -name "*final.bam" | while read F; do samtools view -c ${F} 22 ; done ) | sort -n | gnuplot -e "set terminal dumb 130 40 ; set title 'Reads chr22'; plot '-' with lines notitle;"
Reads chr22
1.6e+06 ++------------+--------------+-------------+--------------+-------------+-------------+--------------+------------++
+ + + + + + + + +
| *
1.5e+06 ++ *+
| * |
|
[include]
# For user/credentials/token/etc
path = ~/.gitconfig.local
[core]
editor = vim
excludesfile = ~/.gitignore
[color]
branch = auto
diff = auto
status = auto