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(gemma.R) | |
library(ggplot2) | |
library(magrittr) | |
library(dplyr) | |
# mouse Eno2 datasets that are annotated with the term for brain | |
brain_eno2 = get_gene_differential_expression_values(13807 , uris = "http://purl.obolibrary.org/obo/UBERON_0000955") |
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(readxl) | |
library(writexl) | |
library(gemma.R) | |
library(GEOquery) | |
library(dplyr) | |
library(glue) | |
data = readxl::read_excel('~/Downloads/Bad_QC_datasets_together.xlsx') | |
datasets = data$dataset |
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::load_all() | |
library(magrittr) | |
datasets <- get_datasets(uris = 'http://purl.obolibrary.org/obo/MONDO_0000408') | |
relevant_terms <- attributes(datasets)$filter %>% stringr::str_extract_all('http.*?(?=,|\\))') %>% {.[[1]]} | |
relevant_terms %<>% c('http://purl.obolibrary.org/obo/CHEBI_16236') | |
dataset_contrasts <- datasets$experiment.shortName %>% | |
lapply(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
library(RCurl) | |
library(xml2) | |
library(dplyr) | |
library(stringr) | |
obsolete <- readr::read_tsv('obsolete-terms.txt') | |
# get our ontology files | |
ontologies <- system2("ssh" ,paste0(ontology_server," ls ", ontology_path),stdout = TRUE) |
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(chromote) | |
startRoll20Session = function(email, password, gameLink,view = FALSE){ | |
b <- chromote::ChromoteSession$new() | |
if(view){ | |
b$view() | |
} | |
b$Page$navigate(gameLink) | |
b$DOM$enable() |
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(gemmaAPI) | |
# identify all yeast datasets | |
yeastStudies = taxonInfo('yeast',request = 'datasets',limit = 0) | |
studyIDs = yeastStudies %>% purrr::map_chr('id') | |
# get metadata for yeast studies | |
yeastMetadata = studyIDs %>% lapply(compileMetadata,outputType = 'list') |
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
# source https://en.wikipedia.org/wiki/Flag_of_Turkey | |
# suggested width for narrow images | |
coverWidth = 590 | |
starOverlap = 2/5-1/3 | |
# approximate and arbitrary | |
G = coverWidth* (4/3 - starOverlap) |
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/Rscript | |
# Rscript install.R packageName | |
# point of this is to be able to install arbitrary packages from CRAN, github, bioconductor, etc from command line | |
# used for my remote server where I use the root library to share packages between my user and the shiny user | |
# sudo install.R glue oganm/ogbox bioc::3.6/affy | |
library(dplyr) | |
library(ogbox) | |
print(.libPaths()) |
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(cranlogs) | |
library(dplyr) | |
allPackages = available.packages() %>% rownames | |
groups = cut(seq_along(allPackages), breaks = seq(0,length(allPackages),20)) %>% {.=as.character(.);.[is.na(.)]='last';factor(.,levels = unique(.))} | |
package_groups = split(allPackages,groups) | |
package_groups %>% lapply(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
library(rayshader) | |
library(ambient) | |
k = 8 | |
m = noise_perlin(dim = c(2^k,2^k),octaves = 9) | |
mToMap(m) | |
m = noise_simplex(c(2^k,2^k),fractal = 'fbm',octaves = 4,lacunarity = 2,gain = .5,frequency = .01) |
NewerOlder