Closed gebdu closed 1 year ago
That example analysis was not written by the Slingshot developers and we cannot ensure it's stability. Please see the official Slingshot vignette here: https://www.bioconductor.org/packages/release/bioc/vignettes/slingshot/inst/doc/vignette.html
I am interested to run slingshot trajectory using your guideline using my Seurat object (Normalized, PCA, tSNE, UMAP, clustering done)
https://bustools.github.io/BUS_notebooks_R/slingshot.html
[1] "orig.ident" "nCount_RNA" [3] "nFeature_RNA" "sample" [5] "tech" "tomato" [7] "percent.mito" "percent.ribo" [9] "pANN_0.25_0.24_3170" "DF.classifications_0.25_0.24_3170" [11] "RNA_snn_res.0.5" "seurat_clusters" [13] "silhouette_score" "RNA_snn_res.0.4" [15] "scina_labels"
sds <- slingshot(Embeddings(seu, "umap"), clusterLabels = seu$seurat_clusters, start.clus = 3, stretch = 0)
cell_pal <- function(cell_vars, pal_fun,...) { if (is.numeric(cell_vars)) { pal <- pal_fun(100, ...) return(pal[cut(cell_vars, breaks = 100)]) } else { categories <- sort(unique(cell_vars)) pal <- setNames(pal_fun(length(categories), ...), categories) return(pal[cell_vars]) } }
cell_colors <- cell_pal(seu$scina_labels, brewer_pal("qual", "Set2")) cell_colors_clust <- cell_pal(seu$seurat_clusters, hue_pal())
plot(reducedDim(sds), col = cell_colors, pch = 16, cex = 0.5)
Error in h(simpleError(msg, call)) : error in evaluating the argument 'x' in selecting a method for function 'plot': unable to find an inherited method for function 'reducedDim' for signature '"PseudotimeOrdering", "missing"'
Could you help what I am missing. I have all the required library installed and called.