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
library(CellCODE) | |
library(dplyr) | |
library(purrr) | |
library(magrittr) | |
library(markerGeneProfile) | |
data('mouseMarkerGenesCombined') | |
# this function will turn gene lists into CellCODE inputs | |
cellCodeInput = function(genes){ | |
geneCount = genes %>% map(length) |
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
# ontologyPlot package requires bioconductor package Rgraphvis | |
# source("https://bioconductor.org/biocLite.R") | |
# biocLite("Rgraphvis") | |
# install.packages('ontologyIndex') | |
# install.packages('ontologyPlot') | |
library(ontologyIndex) | |
library(ontologyPlot) | |
download.file(url = 'http://purl.obolibrary.org/obo/uberon.obo',destfile = 'uberon.obo') |
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
library(stringr) | |
library(magrittr) | |
library(pdftools) | |
library(Hmisc) | |
capitalizeAll = function(x){ | |
words = strsplit(x, ' ') %>% {.[[1]]} | |
capital = sapply(words, function(x){ | |
if(x %in% c('for','of','and','to','into','with','the','from','via')){ | |
return(x) |
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
library(shiny) | |
library(shinyWidgets) | |
moduleUI = function(id){ | |
ns = NS(id) | |
tagList(actionButton(inputId = ns('update'),label = 'update'), | |
progressBar(id = "progressBar", value = 50), | |
checkboxInput(inputId = ns('checkbox'),label = 'shinyCheckbox',value = FALSE)) | |
} |
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
extendShinyjsEvenFurther = function(){ | |
jscode <- ' | |
Shiny.addCustomMessageHandler("mymessage", function(message) { | |
eval(message); | |
}); | |
' | |
tags$head(tags$script(HTML(jscode))) | |
} | |
jsExecute = function(jscode,session){ |
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
devtools::install_github('oganm/neuroExpressoAnalysis') | |
library(neuroExpressoAnalysis) | |
devtools::install_github('oganm/ogbox') | |
library(ogbox) | |
devtools::install_github('oganm/markerGeneProfile') | |
library(markerGeneProfile) | |
library(scales) | |
library(gplots) | |
library(stringr) |
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
{ | |
"data": [ | |
{ | |
"name": "050512MJA_U133_2.0_IB29.CEL", | |
"description": "", | |
"sequencePairedReads": null, | |
"sequenceReadCount": null, | |
"sequenceReadLength": null, | |
"outlier": false, | |
"metadata": null, |
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
#!/usr/bin/env Rscript | |
library(magrittr) | |
library(reshape2) | |
d <- read.csv("FINAL LAB DATA Mar 23 2017.csv", colClasses="character", fileEncoding = "UTF-8-BOM") | |
d <- d[order(d$ID),] | |
# assign each visit a number (per patient) | |
visit.numbers <- tapply(d$Collection.Date, d$ID, function (x) |
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
# if added to a shiny server, fixes the range of the slider to a predetermined length | |
oldSliderCoordinates = reactiveValues(range1 = data$date %>% max %>% subtract(sliderSize), # initial slider location 1 | |
range2 = data$date %>% max) # initial slider location 2 | |
observe({ | |
range = input$dateRange[2] - input$dateRange[1] | |
range %<>% as('numeric') | |
if(range > sliderSize){ | |
if(input$dateRange[2]!= oldSliderCoordinates$range2){ |
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
library(dplyr) | |
library(magrittr) | |
baseR = c('base','compiler','datasets','graphics','grDevices','grid','methods','parallel','splines','stats','stats4','tcltk','utils') | |
explicit = function(fileIn,fileOut, | |
ignore = baseR){ | |
file = readLines(fileIn) | |