Skip to content

Instantly share code, notes, and snippets.

Avatar

Jeff Allen trestletech

View GitHub Profile
@trestletech
trestletech / .gitignore
Last active Mar 3, 2019
Categorize mint.com transactions. Transactions can be exported from Mint and reprocessed in R.
View .gitignore
.Rproj.user
.Rhistory
.RData
transactions/
budgets/
@trestletech
trestletech / .gitignore
Last active Dec 11, 2015
Import My PivotalTracker Stories into Astrid
View .gitignore
setup.sh
token
@trestletech
trestletech / Main.java
Last active Dec 17, 2015
Project to compute the minimum integer > 1 which is not representable by combining an integer using the (parenthesized) +, -, /, and * operations.
View Main.java
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.PrintStream;
public class Main {
public static void main(String[] args){
try{
//Write out to file assuming IntelliJ project layout.
PrintStream out = new PrintStream(new FileOutputStream("src/timing.txt"));
@trestletech
trestletech / server.R
Created Jun 19, 2013
Bug in shiny's renderUI function?
View server.R
require(shiny)
shinyServer(function(input, output) {
val <- reactive({
if(input$change>0) {
# Option 1
'abc'
# # Option 2
# isolate({
@trestletech
trestletech / README.md
Last active Mar 12, 2020
Shiny Example #1 for Bioconductor
View README.md

Bioconductor Shiny Example #1

Simple app comparing the expression of genes between Tumor and Normal tissue.

This is an example Shiny app featuring some basic analysis of Ovarian Cancer gene expression data collected on the Affymetrix U133A platform. We filter the available genes and samples down to a much smaller matrix to make reproducibility simpler for a broader audience. The R code involved in sampling the data is available in this Gist as an R-Markdown file, and the sampled data are available in this Gist as Rds files.

To run the application, install shiny (install.packages("shiny")) then run the following command:

library(shiny)
@trestletech
trestletech / README.md
Last active Sep 25, 2019
Shiny Example #2 for Bioconductor
View README.md

Bioconductor Shiny Example #2

A demonstration of Shiny's text widget support.

This is an example Shiny app featuring some basic analysis of Ovarian Cancer gene expression data collected on the Affymetrix U133A platform. We filter the available genes and samples down to a much smaller matrix to make reproducibility simpler for a broader audience. The R code involved in sampling the data is available in this Gist as an R-Markdown file, and the sampled data are available in this Gist as Rds files.

To run the application, install shiny (install.packages("shiny")) then run the following command:

library(shiny)
@trestletech
trestletech / README.md
Last active Oct 3, 2018
Shiny Example #3 for Bioconductor.
View README.md

Bioconductor Shiny Example #3

Simple app showing the relationship between a gene's expression and survival.

This is an example Shiny app featuring some basic analysis of Ovarian Cancer gene expression data collected on the Affymetrix U133A platform. We filter the available genes and samples down to a much smaller matrix to make reproducibility simpler for a broader audience. The R code involved in sampling the data is available in this Gist as an R-Markdown file, and the sampled data are available in this Gist as Rds files.

To run the application, install shiny (install.packages("shiny")) then run the following command:

library(shiny)
@trestletech
trestletech / README.md
Last active Feb 16, 2017
Shiny Example #4 for Bioconductor
View README.md

Bioconductor Shiny Example #4

Example Shiny App showing an example of being embedded in a larger, non-Shiny workflow.

This is an example Shiny app featuring some basic analysis of Ovarian Cancer gene expression data collected on the Affymetrix U133A platform. We filter the available genes and samples down to a much smaller matrix to make reproducibility simpler for a broader audience. The R code involved in sampling the data is available in this Gist as an R-Markdown file, and the sampled data are available in this Gist as Rds files.

To run the application, install shiny (install.packages("shiny")) then run the following command:

library(shiny)
@trestletech
trestletech / download.R
Last active Dec 19, 2015
Download all 4 bioconductor Gists and put them in your current working directory.
View download.R
getLocalGist <- function(gistID, dirName){
url <- paste0("https://gist.github.com/",gistID,"/download")
if (shiny:::download(url, paste0(dirName,".tar.gz"), mode = "wb", quiet = TRUE) != 0)
stop("Failed to download URL ", url)
gistName <- shiny:::untar2(paste0(dirName,".tar.gz"), list=TRUE)[1]
shiny:::untar2(paste0(dirName,".tar.gz"))
#file.rename seems to be pretty fragile, but this seems to be working...
dir.create(dirName)
View server.R
library(shiny)
shinyServer(function(input, output) {
dataset = reactive({
infile = input$file1
if (is.null(infile))