Comments (3)
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.
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 atbatch_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.
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)
- Questions about building predictive models
- Questions about drug perturbation prediction using cell line data
- labels_key mismatch in scgen.SCGEN.setup_anndata()
- Errors while reading salmonella h5ad files HOT 1
- Inconsistent batch removal when loading saved scGEN model
- Unequal size of perturbated size
- I solved this and several other incompatibilities in my code by going back to tensorflow version 1.15.4
- How to use data with categories unseen by a trained model HOT 1
- DeprecationWarning as error when importing scgen HOT 7
- How to reproduce paper results HOT 5
- Accurate requirements to setup the environment on Windows
- Update depreciated `AnnData.concatenate` HOT 2
- Error in network.batch_removal() due to missing positional argument in AnnData.concatenate() HOT 5
- Question about get_decoded_expression() and predict() functions
- Batch correction incorrectly assigns cell labels HOT 4
- scgen Literal deprecation error HOT 1
- difference between SCGEN and SCGENVAE
- tutorial does not run -- version issues with scvi-tools HOT 3
- TypeError: Can't instantiate abstract class SCGEN with abstract methods setup_anndata HOT 1
- Batch_removal() AttributeError: Can only use .str accessor with string values! HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scgen.