Skip to content

Instantly share code, notes, and snippets.

View mooreryan's full-sized avatar

Ryan Moore mooreryan

View GitHub Profile
@mooreryan
mooreryan / code_listing_1.R
Created May 16, 2019 02:36
Blog -- Rotating axis labels in R
## Set the random seed so your data will be the same as mine.
set.seed(1234)
dat <- list("Cool dataset one" = rnorm(100, 0),
"Cool dataset two" = rnorm(100, 4),
"Another long name" = rnorm(100, 5),
"Really really long" = rnorm(100, 4))
boxplot(dat)
@mooreryan
mooreryan / code_listing_2.R
Created May 16, 2019 02:38
Blog -- Rotating axis labels in R
par(mar = c(6.1, 4.1, 4.1, 4.1), # change the margins
lwd = 2, # increase the line thickness
cex.axis = 1.2 # increase default axis label size
)
@mooreryan
mooreryan / mmseqs_wrapper.sh
Last active June 18, 2019 18:03
Wrapper for MMseqs2
#!/bin/bash
## MIT License
## Copyright (c) 2019 Ryan Moore
## Permission is hereby granted, free of charge, to any person obtaining a copy
## of this software and associated documentation files (the "Software"), to deal
## in the Software without restriction, including without limitation the rights
## to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@mooreryan
mooreryan / logger.R
Last active June 20, 2019 22:34
Simple logger for R scripts
## MIT License
## Copyright (c) 2019 Ryan Moore
## Permission is hereby granted, free of charge, to any person obtaining a copy
## of this software and associated documentation files (the "Software"), to deal
## in the Software without restriction, including without limitation the rights
## to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
## copies of the Software, and to permit persons to whom the Software is
## furnished to do so, subject to the following conditions:
@mooreryan
mooreryan / anvi_enrichment_script_check_loaded_packages.R
Created October 5, 2019 02:01
Check the version numbers of the packages loaded in anvi-run-enrichment-analysis.R
library(optparse)
library(tidyverse)
library(magrittr)
library(qvalue)
loaded_packages <- (.packages())
write.table(installed.packages()[loaded_packages, c("Package", "Version")],
sep = ",",
row.names = FALSE)
#!/usr/bin/env ruby
Signal.trap("PIPE", "EXIT")
require "abort_if"
require "fileutils"
require "optimist"
include AbortIf
(ns cljs_reagent_proj.core
(:require
[reagent.core :as r]
[cljsjs.react-vis :as rvis]))
(def chart-data [{:x 1 :y 1}
{:x 2 :y 2}
{:x 3 :y 4}
{:x 4 :y 5}
{:x 5 :y 4}
(ns cljs_reagent_proj.core
(:require
[reagent.core :as r]
[cljsjs.react-vis :as rvis]))
(def chart-data [{:x 1 :y 1}
{:x 2 :y 2}
{:x 3 :y 4}
{:x 4 :y 5}
{:x 5 :y 4}
(ns cljs_reagent_proj.core
(:require
[reagent.core :as r]
[cljsjs.react-vis :as rvis]))
(def chart-data [{:x 1 :y 1}
{:x 2 :y 2}
{:x 3 :y 4}
{:x 4 :y 5}
{:x 5 :y 4}
(ns cljs_reagent_proj.core
(:require
[reagent.core :as r]
[cljsjs.react-vis :as rvis]))
(def chart-data [{:x 1 :y 1}
{:x 2 :y 2}
{:x 3 :y 4}
{:x 4 :y 5}
{:x 5 :y 4}