Giter Club home page Giter Club logo

Comments (7)

njbernstein avatar njbernstein commented on August 14, 2024 2

Hi Jens,

Let me take a look. It will probably just convert the sparse matrix under the hood into a dense matrix because I don't think cell hashing matrices should cause memory issues. Its interesting the

hdata.X = hdata.X.todense()

didnt work.

from solo.

jenzopr avatar jenzopr commented on August 14, 2024

Funnily, saving the hdata object with force_dense = True (as_dense = True in scanpy >=1.5.1) and reloading the object seems to do the trick.

Nevertheless, can hashsolo be easily written to take sparse matrices as well?

from solo.

jenzopr avatar jenzopr commented on August 14, 2024

Any update? Maybe a workaround? :-)

from solo.

njbernstein avatar njbernstein commented on August 14, 2024

@jenzopr I merged a fix just now let me know if it works.

Some of the indexing I do in hashsolo doesn't work with a dense matrix so the code needs to be:

if issparse(cell_hashing_adata.X):
    cell_hashing_adata.X = np.array(cell_hashing_adata.X.todense())

from solo.

njbernstein avatar njbernstein commented on August 14, 2024

If you need this fix released to pypi let me know otherwise you can install the fix from cloning the master branch and pip installing from there

from solo.

jenzopr avatar jenzopr commented on August 14, 2024

Thats great! Thanks a lot for your support 🎉

from solo.

apredeus avatar apredeus commented on August 14, 2024

Same error still appears to happen in the newest version. Saving the .h5ad file using as_dense='X' option, followed by reading it back in again seems to solve the issue, while

adata.X = adata.X.todense()

does not work.

from solo.

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.