generate_celltype_data {EWCE} | R Documentation |
generate_celltype_data
Takes expression & cell type annotations and
creates celltype_data files which contain the mean and specificity matrices
generate_celltype_data( exp, annotLevels, groupName, no_cores = 1, savePath = tempdir(), normSpec = FALSE )
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. |
Filenames for the saved celltype_data files
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())