Skip to content

Instantly share code, notes, and snippets.

@aaronwolen
aaronwolen / README.md
Last active December 14, 2015 11:59
Copy markdown formatted links from BibDesk
  1. Open the "Template Files" pane in BibDesk's preferences
  2. Use the "+" button to add a new general template
  3. Double click the red text and choose citeServiceTemplateMD.txt
  4. Open the "Citation" pane in BibDesk's preferences
  5. Change "Default format" to "Template"
  6. Change "Template" to "citeServiceTemplateMD"
@aaronwolen
aaronwolen / README.md
Last active December 15, 2015 09:39
Plot multiple protein isoforms in R

A simple function to create plots of multiple protein isoforms in R.

@aaronwolen
aaronwolen / gencode14.rda
Last active December 17, 2015 14:18
Converting genomic intervals to genes using GENCODE
This file has been truncated, but you can view the full file.
@aaronwolen
aaronwolen / references.bib
Last active December 6, 2019 17:30
Bibtex references for my publications.
%% This BibTeX bibliography file was created using BibDesk.
%% https://bibdesk.sourceforge.io/
%% Created for Aaron Wolen at 2019-11-29 14:10:31 -0600
%% Saved with string encoding Unicode (UTF-8)
@aaronwolen
aaronwolen / home.md
Created October 7, 2013 16:33
Contribution solicitation on the VIPBG wiki.

Improve this documentation

Anyone can improve this documentation by either directly contributing or suggesting additional topics to cover.

Adding/editing text

Anyone with a GitHub account can edit any page by simply clicking the "Edit Page" button. The wiki is written in [Markdown][md], an extremely simple markup language.

If you spot a typo, please correct it. If you'd like to add a topic, please do so.

@aaronwolen
aaronwolen / gencode-granges.r
Created February 11, 2014 15:33
Download the latest GENCODE annotations file and export as a GRanges object
# Download the latest GENCODE annotations file and export as a GRanges object
library(RCurl)
library(rtracklayer)
# Variables ---------------------------------------------------------------
# 'human' or 'mouse'
organism <- "human"
@aaronwolen
aaronwolen / alspac-enrichment-figure.r
Created April 15, 2014 18:14
Figures for Alexis' 2014-04-17 seminar.
library(ggplot2)
library(plyr)
# Load data ---------------------------------------------------------------
enrich.file <- "results/alspac/enrichment/enrichment-results-alspac-encode-dnase-h3k4me3.csv"
enrich.df <- read.csv(enrich.file, stringsAsFactors = FALSE)
# address stem-cell samples missing tissue annotation
@aaronwolen
aaronwolen / bwt.r
Created July 18, 2014 16:43
A simple R implementation of the Burrows-Wheeler transformation based on Wikipedia's python example.
# Burrows-Wheeler transformation
#
# Transform:
# out <- bwt('SIX.MIXED.PIXIES.SIFT.SIXTY.PIXIE.DUST.BOXES')
#
# Reverse:
# ibwt(out)
bwt <- function(x, eof = "!") {
@aaronwolen
aaronwolen / insert-proxy-bookmarklet.js
Last active August 29, 2015 14:05
Bookmarklet to automatically insert proxy stems for accessing journal articles off-campus.
javascript:var%20insert_proxy%20=%20function(proxy)%20{var%20url%20=%20document.URL;if%20(url.indexOf(proxy)%20===%20-1)%20{var%20parser%20=%20document.createElement(%27a%27);parser.href%20=%20url;var%20host%20=%20parser.host;if%20(host%20==%20%27www.ncbi.nlm.nih.gov%27)%20{host%20=%20host.replace(/\./g,%20%27-%27);};host%20=%20host.concat(proxy);proxy_url%20=%20url.replace(parser.host,%20host);window.open(proxy_url,%20%27_self%27);};};insert_proxy(%27.proxy.library.vcu.edu%27);
@aaronwolen
aaronwolen / parse-paths.r
Last active August 29, 2015 14:06
Parse FastA paths file into a data.frame
# Parse pathway file containing entries from the KEGG enzyme, orthology and
# pathway databases.
#
# For cases when there are multiple matches across databases all combinations
# of the match are returned. For example, some enzyme entries map to multiple
# orthologies:
#
# K00918 ADP-dependent phosphofructokinase/glucokinase [EC:2.7.1.146 2.7.1.147]
#
# will become...