Git Product home page Git Product logo

Comments (3)

kstreet13 avatar kstreet13 commented on July 2, 2024

Hi @lixin4306ren ,

Thanks for the report! It looks like this line of code is from the vignette and I was able to reproduce the error using the simulated dataset generated there (sim). However, since this is a SingleCellExperiment object, there is no plot3d method for it (I only defined a plot3d method for objects of the class SlingshotDataSet, since SingleCellExperiment objects are highly flexible and may contain multiple components worth plotting in 3D, beyond just the slingshot output). That said, an easy workaround would be something like this:

plot3d(SlingshotDataSet(sce))

But I should also note that in the vignette, I only used the top 2 PCs, so this line will still produce an error when using that dataset. If you adjust the earlier line where rd1 is defined to read

rd1 <- pca$x[,1:3]

then you will have the top 3 PCs and this should work as expected!

Best,
Kelly

from slingshot.

apal6 avatar apal6 commented on July 2, 2024

Hi Kelly,

slingshot_df <- data.frame(colData(deng_SCE)) Error in as.vector(x) : no method for coercing this S4 class to a vector

I have been trying to convert my slingshot object to a dataframe and not sure how to get out of this error. Could you look into this?

Thank you,
Aastha

from slingshot.

kstreet13 avatar kstreet13 commented on July 2, 2024

Sorry, how is this related to the original issue regarding 3D plotting? This seems like more of a general SingleCellExperiment question, but the colData should already be something analogous to a data frame, so I'm not sure why you would need to convert it.

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.