slingshot
slingshot copied to clipboard
Error while plotting the Minimum Distances Between Cell-Type Centroids using Slingshot in r
Hi please i am encountering similar issue how did you fix it. Here is the code:
Run Slingshot
p3.neuron.sds <- slingshot(Embeddings(object=p3.moe.neuron.integrated, "pca")[,1:50],
clusterLabels = [email protected],
start.clus = "GBC",
end.clus = "mOSN",
stretch = 0))
p3.neuron.sds class: PseudotimeOrdering dim: 33388 1 metadata(4): lineages mst slingParams curves pathStats(2): pseudotime weights cellnames(33388): P3_WT_AAACCTGAGATCTGAA P3_WT_AAACCTGAGCACGCCT ... P3_tetH19s_wt_TTTGTTGGTTAACCTG-1 P3_tetH19s_wt_TTTGTTGTCGCCATAA-1 cellData names(2): reducedDim clusterLabels pathnames(1): Lineage1 pathData names(0):
And i am trying to plot the result
svglite(filename = paste0(paper_images,"p3.slingshot.centroids.cell_type.svg"),width=10,height=10) plot(reducedDim(p3.neuron.sds),col=p3.neuron.celltype.col,pch=16,cex=0.5) lines(p3.neuron.sds,lwd=2,type='lineages',col='black') legend("topright",legend=levels([email protected]), col=p3.moe.neuron.colors.cell_type,pch=16,bty='n') invisible(dev.off())
i keep getting this error message:
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"'
can anyone help me out.