This file contains 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 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 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 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 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 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 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 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 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
regions = c('Cortex','Hippocampus','Striatum','Cerebellum','Thalamus') | |
regions %>% lapply(function(x){ | |
cellTypes = names(mouseMarkerGenesCombined[[x]]) | |
cellTypes %>% lapply(function(y){ | |
data.frame(symbol = mouseMarkerGenesCombined[[x]][[y]], NCBIid = mouseMarkerGenesCombinedNCBI[[x]][[y]]) | |
}) | |
}) |
This file contains 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(import5eChar) | |
library(purrr) | |
library(ogbox) | |
library(dplyr) | |
library(ggplot2) | |
library(stringr) | |
library(igraph) | |
library(glue) | |
library(cowplot) | |
charFiles = c(list.files('/srv/shiny-server/printSheetApp/chars/',full.names = TRUE), |