Add Souporcell Clustering Output to a Seurat Object
add_souporcell_seurat.Rd
This function adds an assay to a Seurat object based on Souporcell clustering results.
The assay contains log-transformed and normalized cluster probabilities from the Souporcell clusters.tsv
file.
Principal Component Analysis (PCA) is performed on these probabilities, and the resulting components are added as a dimensionality reduction object.
The Souporcell 'assignment' is added to the Seurat object's metadata under the specified label.
Optionally, assignments can be renamed to be 1-indexed and multiplets collapsed into a single category.
Usage
add_souporcell_seurat(
seurat_obj,
souporcell_file,
prefix = NULL,
assay_name = "GENO",
key = "gpca_",
meta_data_label = "geno",
rd_label = "gpca",
rename_assignments = TRUE
)
Arguments
- seurat_obj
A Seurat object.
- souporcell_file
Path to the Souporcell
clusters.tsv
file.- prefix
Optional prefix to prepend to cell barcodes.
- assay_name
Name of the assay to add to the Seurat object. Default is "GENO".
- key
Key for the dimensionality reduction. Default is "gpca_".
- meta_data_label
Name of the metadata column to store Souporcell assignments. Default is "geno".
- rd_label
Name of the dimensionality reduction object to store PCA results. Default is "gpca".
- rename_assignments
Logical indicating whether to rename Souporcell assignments to be 1-indexed and collapse multiplets. Default is TRUE.