View source: R/generate_celltype_data.r
generate_celltype_data | R Documentation |
generate_celltype_data
takes gene expression data and
cell type annotations and creates CellTypeData (CTD) files which
contain matrices of mean expression and specificity per cell type.
generate_celltype_data(
exp,
annotLevels,
groupName,
no_cores = 1,
savePath = tempdir(),
file_prefix = "ctd",
as_sparse = TRUE,
as_DelayedArray = FALSE,
normSpec = FALSE,
convert_orths = FALSE,
input_species = "mouse",
output_species = "human",
non121_strategy = "drop_both_species",
method = "homologene",
force_new_file = TRUE,
specificity_quantiles = TRUE,
numberOfBins = 40,
dendrograms = TRUE,
return_ctd = FALSE,
verbose = TRUE,
...
)
exp |
Numerical matrix with row for each gene and column for each cell. Row names are 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 |
groupName |
A human readable name for referring to the dataset being used. |
no_cores |
Number of cores that should be used to speedup the
computation.
NOTE: Use |
savePath |
Directory where the CTD file should be saved. |
file_prefix |
Prefix to add to saved CTD file name. |
as_sparse |
Convert |
as_DelayedArray |
Convert |
normSpec |
Boolean indicating whether specificity data should be transformed to a normal distribution by cell type, giving equivalent scores across all cell types. |
convert_orths |
If |
input_species |
The species that the |
output_species |
Species to convert |
non121_strategy |
How to handle genes that don't have
1:1 mappings between
|
method |
R package to use for gene mapping:
|
force_new_file |
If a file of the same name as the one being created already exists, overwrite it. |
specificity_quantiles |
Compute specificity quantiles.
Recommended to set to |
numberOfBins |
Number of quantile 'bins' to use (40 is recommended). |
dendrograms |
Add dendrogram plots |
return_ctd |
Return the CTD object in a list along with the file name, instead of just the file name. |
verbose |
Print messages. |
... |
Arguments passed on to
|
File names for the saved CellTypeData (CTD) files.
# Load the single cell data
cortex_mrna <- ewceData::cortex_mrna()
# Use only a subset to keep the example quick
expData <- cortex_mrna$exp[1:100, ]
l1 <- cortex_mrna$annot$level1class
l2 <- cortex_mrna$annot$level2class
annotLevels <- list(l1 = l1, l2 = l2)
fNames_ALLCELLS <- EWCE::generate_celltype_data(
exp = expData,
annotLevels = annotLevels,
groupName = "allKImouse"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.