Skip to content

Instantly share code, notes, and snippets.

Aaron Wolen aaronwolen

Block or report user

Report or block aaronwolen

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@aaronwolen
aaronwolen / circos-legend.R
Last active Sep 4, 2019
R hack to create legends for Circos heatmaps by parsing the log file
View circos-legend.R
# Parse logs from circos -debug_group legend to generate heatmap legends
#
# circos_legend(
# logfile = "logs/circos.log",
# outdir = "figures/legends",
# width = 4,
# height = 1,
# horizontal = TRUE
# )
#
@aaronwolen
aaronwolen / plot-iranges.R
Created Jul 3, 2019
Simple plotting method for R IRanges and GRanges objects
View plot-iranges.R
# IRanges plot
# by Aaron Wolen (2016)
plot.GRanges <- function(x, ...) plot(GenomicRanges::ranges(x))
plot.IRanges <-
function(x,
xlim = NULL,
ylim = NULL,
height = 0.8,
@aaronwolen
aaronwolen / corrgram_plot.R
Created May 2, 2019
Customized corrgram function
View corrgram_plot.R
# Pairs points panel ------------------------------------------------------
panel_points <- function(x, y, corr = NULL, fit.line = F, ...) {
if(!is.null(corr)) {
return()
}
plot.xy(xy.coords(x, y), type = "p", ...)
box(col = "lightgray")
if(fit.line) {
View pca-plot.r
# Plot two PCA components with optional coloring
plot_pca <- function(x, pcs, annotation,
size = 4, alpha = 0.8, legend.position = c(1, 0)) {
suppressPackageStartupMessages(require(ggplot2))
require(scales)
# check pcs
if (missing(pcs)) pcs <- paste0("PC", 1:2)
stopifnot(length(pcs) == 2)
View osfr_demo.R
# devtools::install_github("aaronwolen/osfr")
library(osfr2)
library(stringr)
# retrieve a user
user <- osf_retrieve_user("alh38")
user
# this is an osf_tbl_user
class(user)
@aaronwolen
aaronwolen / dply-rstudio-server.sh
Last active Oct 17, 2017
Deploy RStudio Server on dply.co
View dply-rstudio-server.sh
#!/bin/bash
# TODO: Install readr
# Skip post-install configuration steps
export DEBIAN_FRONTEND=noninteractive;
# Update
apt-get update;
apt-get -y upgrade;
@aaronwolen
aaronwolen / s4s-alspac-join.r
Created Aug 14, 2017
Joining GWAS data tables
View s4s-alspac-join.r
alspac <- alspac %>%
mutate(allele_key = if_else(
A1 < A2,
paste0(A1, A2),
paste0(A2, A1)
))
s4s <- s4s %>%
mutate(allele_key = if_else(
alleleA < alleleB,
@aaronwolen
aaronwolen / # ghc - 2017-01-19_09-45-03.txt
Created Jan 19, 2017
ghc on "Red Hat Enterprise Linux Server release 6.8 (Santiago)" - Homebrew build logs
View # ghc - 2017-01-19_09-45-03.txt
Homebrew build logs for ghc on "Red Hat Enterprise Linux Server release 6.8 (Santiago)"
Build date: 2017-01-19 09:45:03
@aaronwolen
aaronwolen / mimager-error.log
Created Jan 13, 2017
travis error log for mimager
View mimager-error.log
R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
View homebridge.log
Jan 24 19:29:59 raspberrypi systemd[1]: Started Node.js HomeKit Server.
Jan 24 19:30:00 raspberrypi homebridge[13396]: *** WARNING *** The program 'node' uses the Apple Bonjour compatibility layer of Avahi.
Jan 24 19:30:00 raspberrypi node[13396]: *** WARNING *** The program 'node' uses the Apple Bonjour compatibility layer of Avahi.
Jan 24 19:30:00 raspberrypi node[13396]: *** WARNING *** Please fix your application to use the native API of Avahi!
Jan 24 19:30:00 raspberrypi node[13396]: *** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=node>
Jan 24 19:30:00 raspberrypi node[13396]: *** WARNING *** The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
Jan 24 19:30:00 raspberrypi node[13396]: *** WARNING *** Please fix your application to use the native API of Avahi!
Jan 24 19:30:00 raspberrypi node[13396]: *** WARNING *** For more information see <http://0pointer.de/avahi-c
You can’t perform that action at this time.