get_DE_info_sampleAgnostic | R Documentation |
get_DE_info_sampleAgnostic
Perform differential expression analysis via scran::findMarkers approach. Also visualize the p-value distribution.
get_DE_info_sampleAgnostic(sce, group_id, celltype_id, contrasts_oi, expressed_df, min_cells = 10, contrast_tbl)
sce |
SingleCellExperiment object of the scRNAseq data of interest. Contains both sender and receiver cell types. |
group_id |
Name of the meta data column that indicates from which group/condition a cell comes from |
celltype_id |
Name of the column in the meta data of sce that indicates the cell type of a cell. |
contrasts_oi |
String indicating the contrasts of interest (= which groups/conditions will be compared) for the differential expression and MultiNicheNet analysis.
We will demonstrate here a few examples to indicate how to write this. Check the limma package manuals for more information about defining design matrices and contrasts for differential expression analysis. |
expressed_df |
tibble with three columns: gene, celltype, expressed; this data frame indicates which genes can be considered as expressed in each cell type. |
min_cells |
Indicates the minimal number of cells that a sample should have to be considered in the DE analysis. Default: 10. See 'muscat::pbDS'. |
contrast_tbl |
see explanation in multi_nichenet_analysis function – here: only required to give as input if findMarkers = TRUE. |
List with output of the differential expression analysis in 1) default format('muscat::pbDS()'), and 2) in a tidy table format ('muscat::resDS()') (both in the 'celltype_de' slot); Histogram plot of the p-values is also returned.
## Not run:
library(dplyr)
sample_id = "tumor"
group_id = "pEMT"
celltype_id = "celltype"
batches = NA
covariates = NA
contrasts_oi = c("'High-Low','Low-High'")
contrast_tbl = tibble(contrast = c("High-Low","Low-High"), group = c("High","Low"))
frq_list = get_frac_exprs_sampleAgnostic(sce = sce, sample_id = sample_id, celltype_id = celltype_id, group_id = group_id)
DE_info = get_DE_info_sampleAgnostic(
sce = sce,
celltype_id = celltype_id,
group_id = group_id,
contrasts = contrasts_oi,
expressed_df = frq_list$expressed_df,
contrast_tbl = contrast_tbl)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.