Merge multiple Seurat objects into one.
merge_seurat_objects.RdMerges a list of Seurat objects, rejoins the split layers that Seurat 5 leaves behind, and removes genes that are detected in too few cells. Features of the non-RNA assays (such as ADT and HTO) are always kept.
Details
Elements of seurat_object_list may be Seurat objects, or paths to an
analysis directory containing a seurat_obj.qs2 (as written by the
CLI). Which one it is does not matter to the caller: this function
resolves each element to an object first.
Once every input is an object, this function strips each one's own
reductions, scaled data, and clustering columns before merging. A
per-sample PCA, tSNE/UMAP, or clustering — written by
create_seurat_object()/cluster_seurat_object() — is meaningless once
merged. normalize_counts()/run_pca() recompute all of it downstream
anyway.
Writes metrics-distribution.png, a per-sample QC violin plot, to the
working directory.