This function specifies the gene expression matrix for co-expression network analysis.
Usage
SetDatExpr(
seurat_obj,
group_name,
use_metacells = TRUE,
group.by = NULL,
multi.group.by = NULL,
multi_group_name = NULL,
return_seurat = TRUE,
assay = NULL,
slot = "data",
layer = "data",
mat = NULL,
features = NULL,
wgcna_name = NULL,
...
)
Arguments
- seurat_obj
A Seurat object
- group_name
A string containing a group present in the provided group.by column or in the Seurat Idents. A character vector can be provided to select multiple groups at a time.
- use_metacells
A logical determining if we use the metacells (TRUE) or the full expression matrix (FALSE)
- group.by
A string containing the name of a column in the Seurat object with cell groups (clusters, cell types, etc). If NULL (default), hdWGCNA uses the Seurat Idents as the group.
- multi.group.by
A string containing the name of a column in the Seurat object with groups for consensus WGCNA (dataset, sample, condition, etc)
- multi_group_name
A string containing the name of a group present in the multi.group.by column.
- assay
The name of the assay in the Seurat object
- slot
Slot to extract data for aggregation. Default = 'counts'. Slot is used with Seurat v4 instead of layer.
- layer
Layer to extract data for aggregation. Default = 'counts'. Layer is used with Seurat v5 instead of slot.
- mat
A Matrix containing gene expression data. Supplying a matrix using this parameter ignores other options. This is almost exclusively used for pseudobulk analysis.
- features
A list of features to use to override the features that have been previously set.
- wgcna_name
A string containing the name of the WGCNA slot in seurat_obj@misc. Default = NULL which retrieves the currently active WGCNA data
Details
SetDatExpr is a critical function of the hdWGCNA pipeline that determines the gene expession matrix that will be used for network analysis. We typically use this function to select a cell type or group of cell types for network analysis using the group.by parameter, but we provide additional parameters for further customization.