generate_celltype_data: generate_celltype_data

Description Usage Arguments Value Examples

View source: R/generate_celltype_data.r

Description

generate_celltype_data Takes expression & cell type annotations and creates celltype_data files which contain the mean and specificity matrices

Usage

1
2
3
4
5
6
7
8
generate_celltype_data(
  exp,
  annotLevels,
  groupName,
  no_cores = 1,
  savePath = tempdir(),
  normSpec = FALSE
)

Arguments

exp

Numerical matrix with row for each gene and column for each cell. Row names are MGI/HGNC gene symbols. Column names are cell IDs which can be cross referenced against the annot data frame.

annotLevels

List with arrays of strings containing the cell type names associated with each column in exp

groupName

A human readable name for refering to the dataset being loaded

no_cores

Number of cores that should be used to speedup the computation. Use no_cores = 1 when using this package in windows system.

savePath

Directory where the CTD file should be saved

normSpec

Boolean indicating whether specificity data should be transformed to a normal distribution by cell type, giving equivalent scores across all cell types.

Value

Filenames for the saved celltype_data files

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(ewceData)
# Load the single cell data
cortex_mrna <- cortex_mrna()
expData <- cortex_mrna$exp
expData <- expData[1:100, ] # Use only a subset to keep the example quick
l1 <- cortex_mrna$annot$level1class
l2 <- cortex_mrna$annot$level2class
annotLevels <- list(l1 = l1, l2 = l2)
fNames_ALLCELLS <-
    generate_celltype_data(exp = expData, annotLevels, "allKImouse",
        savePath=tempdir())

NathanSkene/EWCE documentation built on June 19, 2021, 5:40 a.m.