This function prepares single-cell RNA sequencing (scRNA-seq) data for differential gene expression analysis. It extracts the expression data for the specified cells and genes, and organizes them into a dataframe format suitable for downstream analysis.
prepareDataFromscRNA(
object = NULL,
diffData = NULL,
showAverage = TRUE,
cells = NULL,
group.by = "ident",
assays = "RNA",
slot = "data",
scale.data = TRUE,
cluster.order = NULL,
keep.uniqGene = TRUE,
sep = "_"
)
a dataframe containing the expression data for the specified genes and cells, organized in a format suitable for differential gene expression analysis.
an object of class Seurat containing the scRNA-seq data.
a dataframe containing information about the differential expression analysis which can be output from function FindAllMarkers.
a logical indicating whether to show the average gene expression across all cells.
a vector of cell names to extract from the Seurat object. If NULL, all cells will be used.
a string specifying the grouping variable for differential expression analysis. Default is 'ident', which groups cells by their assigned clusters.
a string or vector of strings specifying the assay(s) to extract from the Seurat object. Default is 'RNA'.
a string specifying the slot name where the assay data is stored in the Seurat object. Default is 'data'.
whether do Z-score for expression data, default TRUE.
the celltype orders.
a logical indicating whether to keep only unique gene names. Default is TRUE.
a character string to separate gene and cell names in the output dataframe. Default is "_".