Skip to content

Instantly share code, notes, and snippets.

View trestletech's full-sized avatar

Jeff Allen trestletech

View GitHub Profile
@trestletech
trestletech / .gitignore
Last active March 3, 2019 04:05
Categorize mint.com transactions. Transactions can be exported from Mint and reprocessed in R.
.Rproj.user
.Rhistory
.RData
transactions/
budgets/
@trestletech
trestletech / .gitignore
Last active December 11, 2015 02:29
Import My PivotalTracker Stories into Astrid
setup.sh
token
@trestletech
trestletech / Main.java
Last active December 17, 2015 00:09
Project to compute the minimum integer > 1 which is not representable by combining an integer using the (parenthesized) +, -, /, and * operations.
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 June 19, 2013 05:01
Bug in shiny's renderUI function?
require(shiny)
shinyServer(function(input, output) {
val <- reactive({
if(input$change>0) {
# Option 1
'abc'
# # Option 2
# isolate({
@trestletech
trestletech / README.md
Last active March 12, 2020 12:27
Shiny Example #1 for Bioconductor

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 September 25, 2019 17:43
Shiny Example #2 for Bioconductor

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 October 3, 2018 10:16
Shiny Example #3 for Bioconductor.

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 February 16, 2017 15:24
Shiny Example #4 for Bioconductor

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 December 19, 2015 23:19
Download all 4 bioconductor Gists and put them in your current working directory.
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)
library(shiny)
shinyServer(function(input, output) {
dataset = reactive({
infile = input$file1
if (is.null(infile))