-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ValueError: Invalid expression matrix in .X. nb mode expects raw UMI counts in .X of the AnnData." #12
Comments
Can you run the following code on your
|
Can you try this |
I dont know why my adata has this wrong,because it seems every object is right and ture |
I think you can first check which values in your |
I don't quite know how to determine which value makes my .X are non-integers. Can you help me!help!!! |
One quick, though possibly inefficient, way is:
The first array returned is the row index and the second one is column index for non-integer values in |
hello i have the same issue,when run tnode = sct.train.Trainer(adata)tnode = sct.train.Trainer(adata)
its error like this "ValueError Traceback (most recent call last)
Cell In[22], line 1
----> 1 tnode = sct.train.Trainer(adata)
File ~\AppData\Roaming\Python\Python312\site-packages\sctour\train.py:168, in Trainer.init(self, adata, percent, n_latent, n_ode_hidden, n_vae_hidden, batch_norm, ode_method, step_size, alpha_recon_lec, alpha_recon_lode, alpha_kl, loss_mode, nepoch, batch_size, drop_last, lr, wt_decay, eps, random_state, val_frac, use_gpu)
166 X = self.adata.X.data if sparse.issparse(self.adata.X) else self.adata.X
167 if (X.min() < 0) or np.any(~np.equal(np.mod(X, 1), 0)):
--> 168 raise ValueError(
169 f"Invalid expression matrix in .X. {self.loss_mode} mode expects raw UMI counts in .X of the AnnData."
170 )
172 self.n_cells = adata.n_obs
173 self.batch_size = batch_size
ValueError: Invalid expression matrix in .X. nb mode expects raw UMI counts in .X of the AnnData."
but my .X and .raw.X all integers and my seurat counts are also integers,.help!thk!
The text was updated successfully, but these errors were encountered: