Giter VIP home page Giter VIP logo

Comments (3)

ktpolanski avatar ktpolanski commented on June 9, 2024

Like Carlos mentioned, he was trying to add a .raw attribute to the resulting object, and the expression plots did not have the genes show up where he was expecting them to. Looking at batch_removal(), I understand why. You subset and concatenate the object, reshuffling the order of the cells within it, and then at the end you paste the original .obs_names over the current ordering, essentially scrambling the index.

This can be amended quite easily - just add index_unique=None to each of your .concat() calls. At the end, you can re-sort the final corrected object to match the original's cell ordering rather than overwrite the .obs_names, and if you do that you can just copy the .raw over if you feel like it.

from scgen.

M0hammadL avatar M0hammadL commented on June 9, 2024

Like Carlos mentioned, he was trying to add a .raw attribute to the resulting object, and the expression plots did not have the genes show up where he was expecting them to. Looking at batch_removal(), I understand why. You subset and concatenate the object, reshuffling the order of the cells within it, and then at the end you paste the original .obs_names over the current ordering, essentially scrambling the index.

This can be amended quite easily - just add index_unique=None to each of your .concat() calls. At the end, you can re-sort the final corrected object to match the original's cell ordering rather than overwrite the .obs_names, and if you do that you can just copy the .raw over if you feel like it.

Hi @ktpolanski ,

Yes, this can be easily added, At the moment I am busy with something else, I would be happy if you guys would be interested to fix it and I will happily merge your pull requests.

from scgen.

M0hammadL avatar M0hammadL commented on June 9, 2024

Thanks to @ktpolanski now correc_data also has .raw file of the original adata. @cartal I also updated the example [here(https://nbviewer.jupyter.org/github/M0hammadL/scGen_notebooks/blob/master/notebooks/scgen_batch_removal.ipynb) to show that you can use .raw file after correction.

from scgen.

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.