Last active
December 19, 2015 23:19
-
-
Save trestletech/6033932 to your computer and use it in GitHub Desktop.
Download all 4 bioconductor Gists and put them in your current working directory.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | |
file.copy(paste0(gistName, dir(gistName)), dirName, recursive=TRUE) | |
unlink(gistName, recursive=TRUE) | |
unlink(paste0(dirName,".tar.gz")) | |
} | |
getLocalGist(5924147, "Example1") | |
getLocalGist(5929468, "Example2") | |
getLocalGist(5929598, "Example3") | |
getLocalGist(5948876, "Example4") | |
#Cleanup and load data | |
rm(getLocalGist) | |
normal <- readRDS("Example1/normalExpr.Rds") | |
tumor <- readRDS("Example1/tumorExpr.Rds") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment