ligerToSeurat was creating DimReduc objects using new instead of CreateDimReducObject; this caused issues where the DimReduc object was incomplete due to lack of embedding names and empty slots (see satijalab/seurat#3574).
This PR uses Seurat::CreateDimReduc object (called using the :: construct to avoid importing and depending on Seurat) to create dimensional reduction objects to ensure the DimReduc objects are complete. In addition, it uses [[<- to add the dimensional reduction information to ensure that all DimReducs go through proper validation.
ligerToSeurat
was creatingDimReduc
objects usingnew
instead ofCreateDimReducObject
; this caused issues where theDimReduc
object was incomplete due to lack of embedding names and empty slots (see satijalab/seurat#3574).This PR uses
Seurat::CreateDimReduc
object (called using the::
construct to avoid importing and depending on Seurat) to create dimensional reduction objects to ensure theDimReduc
objects are complete. In addition, it uses[[<-
to add the dimensional reduction information to ensure that allDimReducs
go through proper validation.