Using external list of PCs for clustering I am going to use principal components (PCs) comes from calcPCA function in URD program for clustering my cells in Seurat; So

seurat@dr$pca=URD_object@pca.load

&gt; seurat &lt;- FindClusters(
+     object = seurat, 
+     reduction.type = "pca", 
+     dims.use = 1:8, 
+     resolution = 1.0, 
+     print.output = 0, 
+     save.SNN = TRUE
+ )
Error in GetDimReduction(object = object, reduction.type = reduction.type,  : 
  cell.embeddings slot doesn't exist


There is seuratToURD function but there is not URD to seurat function I guess so I could use URD object for clustering in seurat
How I can overcome this error please? I want to see when I am using PCA from URD what would be my clustering by SNN algorithm in seurat

Thanks a lot for any help
There is a way to do this, and even better--there is documentation for how to do it! No surprise coming from the Satija Lab. In the vignette they perform multidimensional scaling, but the idea is the same. cmdscale() returns the cell embeddings. SetDimReduction() is the Seurat function you are looking for. No manual editing using @ required.

The authors use add mds embeddings, but if you want to add your own pca embeddings swap out "mds" for "pca" and mds for URD_object@pca.load.

# Before running MDS, we first calculate a distance matrix between all pairs
# of cells.  Here we use a simple euclidean distance metric on all genes,
# using object@scale.data as input
d &lt;- dist(x = t(x = pbmc@scale.data))
# Run the MDS procedure, k determines the number of dimensions
mds &lt;- cmdscale(d = d, k = 2)
# cmdscale returns the cell embeddings, we first label the columns to ensure
# downstream consistency
colnames(x = mds) &lt;- paste0("MDS", 1:2)
# We will now store this as a new dimensional reduction called 'mds'
pbmc &lt;- SetDimReduction(object = pbmc, reduction.type = "mds", slot = "cell.embeddings", 
    new.data = mds)
pbmc &lt;- SetDimReduction(object = pbmc, reduction.type = "mds", slot = "key", 
    new.data = "MDS")


See the dimensional reduction vignette for more.