prepareDataFromscRNA: Prepare scRNA Data for clusterGvis Analysis

View source: R/prepareDataFromscRNA.R

prepareDataFromscRNAR Documentation

Prepare scRNA Data for clusterGvis Analysis

Description

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.

Usage

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 = "_"
)

Arguments

object

an object of class Seurat containing the scRNA-seq data.

diffData

a dataframe containing information about the differential expression analysis which can be output from function FindAllMarkers.

showAverage

a logical indicating whether to show the average gene expression across all cells.

cells

a vector of cell names to extract from the Seurat object. If NULL, all cells will be used.

group.by

a string specifying the grouping variable for differential expression analysis. Default is 'ident', which groups cells by their assigned clusters.

assays

a string or vector of strings specifying the assay(s) to extract from the Seurat object. Default is 'RNA'.

slot

a string specifying the slot name where the assay data is stored in the Seurat object. Default is 'data'.

scale.data

whether do Z-score for expression data, default TRUE.

cluster.order

the celltype orders.

keep.uniqGene

a logical indicating whether to keep only unique gene names. Default is TRUE.

sep

a character string to separate gene and cell names in the output dataframe. Default is "_".

Value

a dataframe containing the expression data for the specified genes and cells, organized in a format suitable for differential gene expression analysis.


ClusterGVis documentation built on April 4, 2025, 2:27 a.m.