SetDatExpr.Rd
This function specifies the gene expression matrix for co-expression network analysis.
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,
wgcna_name = NULL,
...
)
A Seurat object
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.
A logical determining if we use the metacells (TRUE) or the full expression matrix (FALSE)
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.
A string containing the name of a column in the Seurat object with groups for consensus WGCNA (dataset, sample, condition, etc)
A string containing the name of a group present in the multi.group.by column.
The name of the assay in the Seurat object
Slot to extract data for aggregation. Default = 'counts'. Slot is used with Seurat v4 instead of layer.
Layer to extract data for aggregation. Default = 'counts'. Layer is used with Seurat v5 instead of slot.
A Matrix containing gene expression data. Supplying a matrix using this parameter ignores other options. This is almost exclusively used for pseudobulk analysis.
A string containing the name of the WGCNA slot in seurat_obj@misc. Default = NULL which retrieves the currently active WGCNA data
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.