Comments (4)
I think my recent commit should fix this issue. now dynamo automatically checks your layer inform and avoids normalizing data that are not conventional. so you will only added X_unspliced, X_spliced
in layers after receipe_monocle
, this also fixes the issue in tl.moments
. Feel free to pull those latest changes and install the newest version to try it out. Please let me know how it goes.
p.s. running something like the following without worrying about those unconventional layers anymore:
dyn.pp.recipe_monocle(adata)
dyn.tl.moments(adata)
dyn.tl.dynamics(adata)
dyn.tl.reduceDimension(adata)
dyn.tl.cell_velocities(adata)
dyn.vf.VectorField(adata, basis='umap')
dyn.vf.topography(adata, basis='umap')
dyn.pl.streamline_plot(adata, basis='umap')
from dynamo-release.
Hey @ccruizm thanks for your interest in dynamo! My immediate thought regarding this error is that you got a few non-standard layers (especially those norm_data, scale_data layers). To filter this possibility, could you please first deleting 'norm_data', 'scale_data', 'ambiguous', 'matrix',
layers? you can do that by:
del adata.layers['norm_data'], adata.layers['scale_data'], adata.layers['matrix'], adata.layers['norm_data']
and then run
dyn.pp.recipe_monocle(adata)
dyn.tl.dynamics(adata)
dyn.tl.reduceDimension(adata)
dyn.tl.cell_velocities(adata)
dyn.vf.VectorField(adata, basis='umap')
dyn.vf.topography(adata, basis='umap')
......
We still need to figure out the exact issue and would like to use your other norm or scaled layer inform. So in order to reproduce your error, if you can share me with a small sample of your dataset (like 100 cells), I can do some more careful investigations to have an ideal solution. (I probably can also fake an anndata object like yours too)
btw, for keys in .obsm, the anndata convention is to have a X_
at beginning. So you may need to name those keys as 'X_mnn_cell_embeddings', 'X_pca_cell_embeddings', 'X_umap_cell_embeddings'
instead of 'mnn_cell_embeddings', 'pca_cell_embeddings', 'umap_cell_embeddings'
.
from dynamo-release.
I just tested and found that the issue is indeed because of the existence of 'norm_data', 'scale_data'
layers. Since dyn.tl.moments
assumes either conventional scRNA-seq data (only_splicing
) with unspliced, spliced
layers or labeling data with either new, total
(only_labeling
) or uu, ul, su, sl
layers (uu
, ul
, su
, sl
(splicing_and_labeling
) corresponds to unspliced unlabelled, unspliced labeled, spliced unlabeled and spliced labeled), so it cannot find those layers which leads to the indexing error above:
--> 150 layer_y_group = np.where([layer2 in x for x in
151 [only_splicing, only_labeling, splicing_and_labeling]])[0][0]```
One quick solution (better than the above one) now is to set `layers = ['X_spliced', 'X_unspliced']` when you run moments. Something like the following:
dyn.pp.recipe_monocle(adata)
dyn.tl.moments(adata, layers=['X_unspliced', 'X_spliced'])
dyn.tl.dynamics(adata)
dyn.tl.reduceDimension(adata)
dyn.tl.cell_velocities(adata)
dyn.vf.VectorField(adata, basis='umap')
dyn.vf.topography(adata, basis='umap')
dyn.pl.streamline_plot(adata, basis='umap')
......
from dynamo-release.
Thanks so such for the quick reply and fixing the issue! Now it works smoothly!
from dynamo-release.
Related Issues (20)
- kmc velocity projection method raise ValueError HOT 2
- Further optimize Preprocessor HOT 2
- AI docs assistant HOT 2
- Improvement of Test Files HOT 2
- Bug on 3D plots HOT 2
- Automatically generated release notes HOT 2
- save h5ad error [TypeError: Can't implicitly convert non-string objects to strings] HOT 11
- ModuleNotFoundError: No module named 'hnswlib' when running dyn.tl.cell_velocities(adata_hsc_raw) HOT 2
- Missing documentation for vector_field_function HOT 6
- bugs in pl.scatters when dealing with large scale datasets (> 1 million points) HOT 1
- Bugs when I do not intend to use PCA to infer in-silico perturbation HOT 4
- Is there a way to run the animate fate transition code block for an in-silico perturbed vector field? HOT 12
- Is there a function that can generate velocity graph, similar to scv.tl.velocity_graph? HOT 2
- Error about group parameter in dyn. tl. dynamics HOT 4
- Which two layers of dynast are suitable as new and total for scNT-seq? HOT 2
- Most probably path predictions: error message: 'networkx.convert_matrix' has no attribute 'from_scipy_sparse_matrix' HOT 2
- Separate two condition and fix the grid HOT 20
- LinAlgError when running dyn.tl.dynamics() HOT 4
- Input X contains NaN. HOT 3
- gene names missing when using dyn.pl.highest_frac_genes HOT 2
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 dynamo-release.