- Open the "Template Files" pane in BibDesk's preferences
- Use the "+" button to add a new general template
- Double click the red text and choose
citeServiceTemplateMD.txt
- Open the "Citation" pane in BibDesk's preferences
- Change "Default format" to "Template"
- Change "Template" to "citeServiceTemplateMD"
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
```{r} | |
library(microbenchmark) | |
set.seed(1024) | |
nr <- 1e4 | |
nc <- 100 | |
m <- matrix(runif(nr * nc), nrow = nr, | |
dimnames = list(paste0("g", seq_len(nr)), | |
paste0("s", seq_len(nc)))) |
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
# dataframetools | |
# A few simple functions for performing simple tasks with data.frames | |
# --- | |
# Includes functions for: | |
# | |
# - reordering data.frames | |
# - identifying invariant or blank columns | |
# - identifying groups of columns that are redundant with each other | |
# - converting all columns of class factor to class character |
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
#' Generate data.frame of feature annotations | |
#' | |
#' Use bioconductor annotation packages to create a data.frame of feature/probe | |
#' annotations. | |
#' | |
#' @param chip character string identifying chip model (e.g., "illuminaHumanv2") | |
#' @param features optional character vector of chip features (i.e., probeset ids) | |
#' @param vars character vector of desired annotations. These must match objects | |
#' provided by the annotation package (e.g., "CHR") | |
#' @param duplicate.values how should duplicate values be handled? The default |
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
#' FTP tree mapper | |
#' Save an FTP site's directory stucture as a list. | |
#' @author Aaron Wolen | |
#' | |
#' @example | |
#' url <- 'ftp://ftp.genboree.org/EpigenomeAtlas/Current-Release/experiment-sample' | |
#' roadmap <- map_ftp(url = url, dirs = "Histone_H2BK120ac", recursive = TRUE) | |
map_ftp <- function(url, dirs, recursive = FALSE) { | |
require(RCurl, quietly = TRUE) |
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
Name | URL | |
---|---|---|
ENCODE | ftp://encodeftp.cse.ucsc.edu/pipeline/hg19/ | |
ENCODE (test) | http://hgdownload-test.cse.ucsc.edu/goldenPath/hg19/encodeDCC/ | |
RoadMap | ftp://ftp.genboree.org/EpigenomeAtlas/Current-Release |
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
library(IRanges) | |
library(GenomicRanges) | |
library(rtracklayer) | |
# Select a BigWig file | |
bw.dir <- "/home/chromatin/roadmap/DNase_hypersensitivity/brain_fetal" | |
bw.file <- dir(bw.dir, full.names = TRUE, pattern = "*.bigWig")[1] | |
# Specify a genomic range | |
selection <- GRanges(seqnames = "chr4", |
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
install.packages(c("RCurl", "XML")) | |
bioc.v <- tools:::.BioC_version_associated_with_R_version | |
repos <- tools:::.read_repositories(file.path(R.home("etc"), "repositories")) | |
bioc.repo <- repos["BioCsoft",]$URL | |
bioc.repo <- sub("2\\.\\d+", bioc.v, bioc.repo) | |
packages <- c("zlibbioc", "BiocGenerics", "Biobase", "IRanges", | |
"AnnotationDbi", "GenomicRanges", "Biostrings", "Rsamtools", |
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
#!/bin/bash | |
# Partially convert Rnw presentations to Rmd syntax | |
# - [x]: Code chunks | |
# - [x]: Section headers | |
# - [x]: Slide headers | |
# - [x]: Presenter notes | |
# - [x]: Lists | |
# - [ ]: Inlinde code (sort of, not really) |
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
clipboard <- function(x, sep.lines = FALSE){ | |
clipboard <- pipe('pbcopy', 'w') | |
if(sep.lines){ | |
x <- unlist(strsplit(as.character(x), split = ",")) | |
x <- sub(" ", "", x) | |
} | |
write.table(x, clipboard, sep = "\t", | |
quote = FALSE, col.names = FALSE, row.names = FALSE) |