Skip to content

Instantly share code, notes, and snippets.

View bergeycm's full-sized avatar

Christina Bergey bergeycm

View GitHub Profile
@bergeycm
bergeycm / plot-kitty.R
Created August 29, 2014 17:29
R function to grab a random picture of a cat and a random quote from Dune and plot them together.
plot.kitty = function () {
library(jpeg)
temp.cat = tempfile()
download.file("http://thecatapi.com/api/images/get?format=src&type=jpg",
destfile=temp.cat)
kitty = readJPEG(temp.cat)
@bergeycm
bergeycm / find_CpGs.pl
Created October 14, 2015 19:24
Script to find CpG sites in a FASTA file.
#!/usr/bin/perl
use strict;
use warnings;
my $verbose = 0;
# Path to FASTA, hard-coded due to laziness
my $genome = "./genomes/papAnu2/papAnu2.fa";
@bergeycm
bergeycm / set_NatGeo_img_as_desktop.sh
Created December 9, 2015 18:04
Sets National Geographic's Image of the Day as Desktop background for Mac OSX
#!/bin/bash
cd ~/Pictures/NatGeo
rm NG_img_of_day
rm NG_img_of_day_site
rm national-geographic-photo-of-the-day_*.jpg
curl http://photography.nationalgeographic.com/photography/photo-of-the-day/ \
-o NG_img_of_day
#!/usr/bin/env Rscript
library(ggtree)
library(ape)
library(tidytree)
library(scales)
library(colorspace)
library(ggplot2)
prim = read.tree("morgan.tre")