Git Product home page Git Product logo

Comments (4)

kstreet13 avatar kstreet13 commented on July 29, 2024

Hi @connerlambden ,

I think this is the best strategy (running Slingshot in PC space and only using UMAP for visualization), but unfortunately since UMAP is non-linear, it doesn't always produce congruent results.

One thing you could try is to re-run UMAP with slightly different parameters (or even just a different random seed) and see if it improves. Otherwise, I would just color the points on the UMAP plot by pseudotime and either forgo the lines or draw them by hand/in PowerPoint (I've seen a lot of published papers do something like this). This isn't the most satisfying solution, but it is only for visualization, and the actual pseudotime values will be derived from the PCs, anyway.

Best,
Kelly

from slingshot.

connerlambden avatar connerlambden commented on July 29, 2024

Thanks for the help. I'm trying the following:

umap_curve_embedding <- embedCurves(sce, newDimRed=reducedDims(sce)$UMAP) lines(SlingshotDataSet(umap_curve_embedding)@curves[[1]]$s, lwd = 2, col = 'red')
Screenshot 2023-03-13 at 6 20 16 PM

Results look super weird. Any ideas? Also, how do I do this on a per-lineage basis?

from slingshot.

kstreet13 avatar kstreet13 commented on July 29, 2024

Haha, I often get this type of plot myself. The issue is that the s matrix is not re-ordered, so the cells in that matrix match up with the cells in your original data. If you want to put them in order of pseudotime, there is a corresponding index you can use (SlingshotDataSet(umap_curve_embedding)@curves[[1]]$ord), but we wrote a lines function for SlingshotDataSet objects that should know how to handle this properly. If lines(SlingshotDataSet(umap_curve_embedding), lwd = 2, col = 'red') doesn't work, let me know! And you can give a vector of different colors if you don't want all lineages to be the same color.

from slingshot.

connerlambden avatar connerlambden commented on July 29, 2024

Thanks that worked!

from slingshot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.