BuildGeneStatList: Build cluster-wise list of gene expression statistics from...

View source: R/BuildInx.R

BuildGeneStatListR Documentation

Build cluster-wise list of gene expression statistics from scRNAseq data

Description

This function takes a Seurat or SingleCellExperiment object and builds a list of dataframes containing gene expression statistics for all genes of each cluster. This can be used as the input to BuildCCInx for generating cell-cell interaction predictions between cell-type clusters.

Usage

BuildGeneStatList(
  inD,
  cl,
  assayType = "",
  assaySlot = "",
  exponent = 2,
  pseudocount = 1
)

Arguments

inD

The input dataset. An object of class seurat or SingleCellExperiment. Other data classes are not currently supported. Please submit requests for other data objects here!

cl

a factor where each value is the cluster assignment for a cell (column) in the input gene expression matrix.

assayType

Default = "" (for Seurat v1/2). A length-one character vector representing the assay slot in which the expression data is stored in the input object. This is not required for Seurat v1 or v2 objects. See getExpr for details.

assaySlot

An optional length-one character vector representing the slot of the Seurat v3 Assay object to use. Not used for other single-cell data objects. The default is to use the normalized data in the "data" slot, but you can also use the SCTransform-corrected counts by setting assayType = "SCT" and assaySlot = "counts". This is recommended, as it will speed up differential expression calculations. See getExpr for details.

exponent

Default = 2. A length-one numeric vector representing the base of the log-normalized gene expression data to be processed. Generally gene expression data is transformed into log2 space when normalizing (set this to 2), though Seurat uses the natural log (set this to exp(1)).

pseudocount

Default = 1. A length-one numeric vector representing the pseudocount added to all log-normalized values in your input data. Most methods use a pseudocount of 1 to eliminate log(0) errors.

References

Mean gene expression calculations Innes BT and Bader GD. scClustViz – Single-cell RNAseq cluster assessment and visualization [version 2; peer review: 2 approved]. F1000Research 2019, 7:1522 (https://doi.org/10.12688/f1000research.16198.2)

See Also

CalcCGS


BaderLab/CCInx documentation built on Jan. 31, 2023, 5:52 p.m.