-
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
Invalid expression matrix #11
Comments
Hi, |
Thanks for your reply! |
If neither |
hello i have the same issue,when run tnode = sct.train.Trainer(adata)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) ValueError: Invalid expression matrix in but my .X and .raw.X all integers and my seurat counts are also integers,.help!thk! |
The first and second step can be run,but when I run follow mode:
tnode = sct.train.Trainer(atest2)
such an error can occur:
ValueError Traceback (most recent call last)
Cell In[145], line 1
----> 1 tnode = sct.train.Trainer(atest2)
File ~/miniconda3/envs/scanpy/lib/python3.12/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.Does It mean the data is not raw data? How do I fix it? THANKS!
The text was updated successfully, but these errors were encountered: