View source: R/calculate_celltype_enrichment_limma.r
calculate_celltype_enrichment_limma | R Documentation |
Calculate celltype enrichments without MAGMA using adjusted MAGMA Z-statistic from .genes.out files.
calculate_celltype_enrichment_limma(
magmaAdjZ,
ctd,
ctd_species = infer_ctd_species(ctd = ctd),
annotLevel = 1,
prepare_ctd = TRUE,
thresh = 1e-04,
celltypes = NULL,
return_all = FALSE,
verbose = TRUE,
...
)
magmaAdjZ |
Output from adjust_zstat_in_genesOut. |
ctd |
Cell type data structure containing
|
ctd_species |
Species name relevant to the CellTypeDataset ( |
annotLevel |
Level within the |
prepare_ctd |
Whether to run
prepare_quantile_groups on the |
thresh |
A threshold on low specificity values (used to drop genes). |
celltypes |
Cell types to conduct tests for. Defaults to all cell types
available in selected |
return_all |
Return a list of both the processed
data input and the enrichment results (Default).
If |
verbose |
Print messages. |
... |
Additional arguments passed to standardise_ctd. |
ctd <- ewceData::ctd()
# The package stores an example genesOut file, so save this to a tempfile
myGenesOut <- MAGMA.Celltyping::import_magma_files(
ids = c("ieu-a-298"),
file_types = ".genes.out",
return_dir = FALSE)
#### Get adjust gene z-scores ####
magmaAdjZ <- MAGMA.Celltyping::adjust_zstat_in_genesOut(
ctd = ctd,
magma_GenesOut_file = myGenesOut)
#### Get cell type enrichment ####
ps <- MAGMA.Celltyping::calculate_celltype_enrichment_limma(
magmaAdjZ = magmaAdjZ,
ctd = ctd)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.