muscat_analysis | R Documentation |
muscat_analysis
Perform a multi-sample multi-condition DE analysis with the pseudobulk approach implemented in muscat.
muscat_analysis( sce, celltype_id, sample_id, group_id, covariates, contrasts_oi, contrast_tbl, assay_oi_pb ="counts", fun_oi_pb = "sum", de_method_oi = "edgeR", min_cells = 10, verbose = FALSE )
sce |
SingleCellExperiment object of the scRNAseq data of interest. |
celltype_id |
Name of the column in the meta data of sce that indicates the cell type of a cell. |
sample_id |
Name of the meta data column that indicates from which sample/patient a cell comes from (in sce) |
group_id |
Name of the meta data column that indicates from which group/condition a cell comes from (in sce) |
covariates |
NA if no covariates should be corrected for. If there should be corrected for covariates, this argument should be the name(s) of the columns in the meta data that indicate the covariate(s). |
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. |
contrast_tbl |
Data frame providing names for each of the contrasts in contrasts_oi in the 'contrast' column, and the corresponding group of interest in the 'group' column. Entries in the 'group' column should thus be present in the group_id column in the metadata. Example for ‘contrasts_oi = c("’A-(B+C+D)/3', 'B-(A+C+D)/3'")': 'contrast_tbl = tibble(contrast = c("A-(B+C+D)/3","B-(A+C+D)/3"), group = c("A","B"))' |
assay_oi_pb |
Indicates which information of the assay of interest should be used (counts, scaled data,...). Default: "counts". See 'muscat::aggregateData'. |
fun_oi_pb |
Indicates way of doing the pseudobulking. Default: "sum". See 'muscat::aggregateData'. |
de_method_oi |
Indicates the DE method that will be used after pseudobulking. Default: "edgeR". See 'muscat::pbDS'. |
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'. |
verbose |
Indicate which different steps of the pipeline are running or not. Default: FALSE. |
List containing information and output of the Muscat analysis.
celltype_info: contains average expression value and fraction of each cell type - sample combination,
celltype_de: contains output of the differential expression analysis,
grouping_tbl: data frame showing the group per sample
## Not run: library(dplyr) sample_id = "tumor" group_id = "pEMT" celltype_id = "celltype" covariates = NA contrasts_oi = c("'High-Low','Low-High'") contrast_tbl = tibble(contrast = c("High-Low","Low-High"), group = c("High","Low")) output = muscat_analysis( sce = sce, celltype_id = celltype_id, sample_id = sample_id, group_id = group_id, covariates = covariates, contrasts_oi = contrasts_oi, 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.