Skip to content

Instantly share code, notes, and snippets.

View lcolladotor's full-sized avatar

Leonardo Collado-Torres lcolladotor

View GitHub Profile
@lcolladotor
lcolladotor / commands.sh
Created April 19, 2021 19:26
Learning about setfacl at JHPCE
cd /dcl01/lieber/ajaffe/lab
# cd ~ # My tests didn't work in my home dir (setfacl: test_main: Operation not supported)
mkdir test_setfacl
cd test_setfacl
rm -fr test_main test_proj2
mkdir test_main
chgrp lieber_jaffe test_main
chmod g+s test_main
## Related to https://docs.google.com/document/d/1uDdq0W9eAEnyPLf_gKJRKI8TGpujXIhGhaHBuLdmmRE/edit?usp=sharing
## and Berto et al 2019 https://www.pnas.org/content/116/48/24334
library("SummarizedExperiment")
## The two data sets we'll use
datasets <- c("NeuN", "OLIG2")
## Read in data for both datasets and build a SummarizedExperiment object
rse_list <- lapply(datasets, function(dataid) {
> current
[1] "annotate"
[2] "AnnotationDbi"
[3] "AnnotationFilter"
[4] "AnnotationForge"
[5] "AnnotationHub"
[6] "AnnotationHubData"
[7] "ari"
[8] "AsioHeaders"
[9] "askpass"
---
title: "Test seed in Rmd"
author: "Leonardo Collado-Torres"
date: "10/20/2020"
output: html_document
---
_This Rmd file is in response to a question during the [R-Ladies Baltimore 2020-10-20 event](https://www.meetup.com/rladies-baltimore/events/273327907/). The code is available on this [gist](https://gist.github.com/lcolladotor/8a7165dbcdba06e09230daf3cb5ebabe) and the rendered version is available through [RPubs](https://rpubs.com/lcollado/test_seed_rmd)._
Set the seed then print a set of random 10 letters.
library("BiocFileCache")
library("SummarizedExperiment")
library("googlesheets4")
## Location for temporarely downloading the files
bfc_temp <- BiocFileCache(tempdir())
## Download the BSP1 and BSP2 data
bsp1_data <- bfcrpath(bfc_temp, "https://s3.us-east-2.amazonaws.com/jaffe-nat-neuro-2018/rse_gene_BrainSeq_Phase1_hg19_TopHat2_EnsemblV75.rda")
bsp2_data <- bfcrpath(bfc_temp, "https://s3.us-east-2.amazonaws.com/libd-brainseq2/rse_gene_unfiltered.Rdata")
## For https://docs.google.com/document/d/1iWKnvbn6wGS66rVTRSGkFcJyIKccWTCniN5CWvYuvfw/edit?usp=sharing
## Install R packages if needed
# if (!requireNamespace("remotes", quietly = TRUE)) {
# install.packages("remotes")
# }
# remotes::install_cran("ggplot2")
# remotes::install_cran("plotly")
# remotes::install_cran("sessioninfo")
# remotes::install_cran("BiocManager")
## LIBD rstats club 2020-08-28
## https://docs.google.com/document/d/1bsq-1FfHkgoviECdhlA594T_G-kA2B88JMI5485Z4E4/edit?usp=sharing
library("shiny")
## From https://shiny.rstudio.com/articles/basics.html
# Define UI for app that draws a histogram ----
ui <- fluidPage(
# App title ----
@lcolladotor
lcolladotor / recountWorkshop2020_questions.md
Created July 27, 2020 20:17
recountWorkshop2020 quesions

Chat messages

Hi! Tomorrow is the workshop! ^^ I'm hope that you are excited about it. You can find the materials at http://research.libd.org/recountWorkshop2020/index.html. I'll start the workshop with some slides about the recount2 project & friends, then we'll run some of the code in the workshop (it was originally designed for a 2 hour workshop). I'll finish with a few slides about the future and then we can have a Q & A session, though you are more than welcome to continue asking questions beyond the workshop through the different venues (Bioconductor support site for package questions, GitHub issues for feature requests, Slack for informal questions, etc). See you tomorrow! Best, Leo

The slides are available at https://speakerdeck.com/lcolladotor

Questions and answers:

  • "how does scale_count fun work?" As described in the workshop and associated recountWorkflow, it uses the area under the coverage (AUC) and the base-pair coverage counts. In practice, this data is stored in the RangedSummarized
library("purrr")
# View(mtcars)
.x <- mtcars[[1]]
mean(.x)
map_dbl(mtcars, ~ mean(.x))
map_dbl(mtcars, mean)
# rnorm()
# args(rnorm)
## From https://docs.google.com/document/d/1CSCPUfHGMoa_QTDf6EUsFMYVTiA5GP8OyeIGCyTVbLI/edit?usp=sharing
if (!requireNamespace("remotes", quietly = TRUE)) {
install.packages("remotes")
}
remotes::install_cran(
c(
"tidyverse", "gganimate", "maps", "knitr", "kableExtra",
"scales", "lubridate", "RColorBrewer"
)