R/data.R

#' Zeisel 2018 dataset for TEINH15, TEINH19, MGL1, MOL1 cells
#'
#' See link: http://mousebrain.org/celltypes/
#'
#' @source
#' The code to prepare the .Rda file file is:
#' \code{
#'# create a temporary directory
#'td <- tempdir()
#'# create the placeholder file
#'tf <- tempfile(tmpdir = td, fileext = ".loom")
#'# download into the placeholder file
#'download.file("https://storage.googleapis.com/linnarsson-lab-loom/l5_all.loom", tf) # tf="~/l5_all.loom"
#'unzip(tf)
#'allExp <- prep_zeisel2018(path = tf)
#'keptExp <- merge_zeisel_celltypes(allExp, useCells = c("TEINH15", "TEINH19", "MGL1", "MOL1"))
#'indvExp <- split_celltypes_byIndv(keptExp, joinCells = c("TEINH15", "TEINH19"), 
#'                                  nCases = 3, jointName = "TEINH")
#'# Save dataset so that it can be used easily
#'usethis::use_data(indvExp, overwrite = TRUE)
#' }
#'
"indvExp"

#' Downsampled cells Zeisel 2018 dataset for TEINH15, TEINH19, MGL1, MOL1 cells
#'
#' See link: http://mousebrain.org/celltypes/
#'
#' @source
#' The code to prepare the .Rda file file is:
#' \code{
#'# create a temporary directory
#'td <- tempdir()
#'# create the placeholder file
#'tf <- tempfile(tmpdir = td, fileext = ".loom")
#'# download into the placeholder file
#'download.file("https://storage.googleapis.com/linnarsson-lab-loom/l5_all.loom", tf) # tf="~/l5_all.loom"
#'unzip(tf)
#'allExp <- prep_zeisel2018(path = tf)
#'keptExp <- merge_zeisel_celltypes(allExp, useCells = c("TEINH15", "TEINH19", "MGL1", "MOL1"))
#'indvExp <- split_celltypes_byIndv(keptExp, joinCells = c("TEINH15", "TEINH19"), 
#'                                  nCases = 3, jointName = "TEINH")
#' keptExp_ds <- downsample_cells(keptExp = keptExp,
#'prop_cell = c(0.5,0.5,0.05,0.02))
#'indvExp_ds <- split_celltypes_byIndv(keptExp_ds, joinCells = c("TEINH15", "TEINH19"), 
#'nCases = 3, jointName = "TEINH")
#'
#'# Save dataset so that it can be used easily
#'usethis::use_data(indvExp_ds, overwrite = TRUE)
#' }
#'
"indvExp_ds"

#' Downsampled cells and genes Zeisel 2018 dataset for TEINH15, TEINH19, MGL1, MOL1 cells
#'
#' See link: http://mousebrain.org/celltypes/
#'
#' @source
#' The code to prepare the .Rda file file is:
#' \code{
#'# create a temporary directory
#'td <- tempdir()
#'# create the placeholder file
#'tf <- tempfile(tmpdir = td, fileext = ".loom")
#'# download into the placeholder file
#'download.file("https://storage.googleapis.com/linnarsson-lab-loom/l5_all.loom", tf) # tf="~/l5_all.loom"
#'unzip(tf)
#'allExp <- prep_zeisel2018(path = tf)
#'keptExp <- merge_zeisel_celltypes(allExp, useCells = c("TEINH15", "TEINH19", "MGL1", "MOL1"))
#'indvExp <- split_celltypes_byIndv(keptExp, joinCells = c("TEINH15", "TEINH19"), 
#'                                  nCases = 3, jointName = "TEINH")
#' keptExp_ds <- downsample_cells(keptExp = keptExp,
#'prop_cell = c(0.5,0.5,0.05,0.02))
#'indvExp_ds <- split_celltypes_byIndv(keptExp_ds, joinCells = c("TEINH15", "TEINH19"), 
#'nCases = 3, jointName = "TEINH")
#'
#'keptExp_ds_4K <- downsample_cells(keptExp = keptExp,
#'                                  prop_cell = c(0.5,0.5,0.05,0.02),
#'                                  n_top_genes = 4000)
#'indvExp_ds_4K <- split_celltypes_byIndv(keptExp_ds_4K, joinCells = c("TEINH15", "TEINH19"), 
#'                                        nCases = 3, jointName = "TEINH")
#'
#'# Save dataset so that it can be used easily
#'usethis::use_data(indvExp_ds_4K, overwrite = TRUE)
#' }
#'
"indvExp_ds_4K"
neurogenomics/scFlowExamples documentation built on Dec. 22, 2021, 1:13 a.m.