Comments (11)
Hi,
I had the same issue but I work it around using older versions of numpy and h5py. I'm using python v3.7.
@marzamKI try to uninstall numpy and h5py and then do:
pip install h5py==2.10.0
pip install numpy==1.19.5
In my case, when I run solo jsonfile.json dataset.loom again, I don't have the TypeError: Indexing arrays must have integer
anymore, solo finish preprocessing of the data and start training of the neural network.
It seems to be an issue of h5py/numpy, see here.
Best,
Carlo
from solo.
I haven't seen the error before. I think your indexes must be cast to integers. I can try to help troubleshoot if you are willing to send me your data or a subset of it.
from solo.
Hey,
Thank you for your prompt reply!
I'm using the loom files from Linnarsson lab (http://loom.linnarssonlab.org/) - in particular the L6_Immature_Neurons, tho I suspect I'd get the same error with the others as well..
from solo.
Hi @marzamKI, @njbernstein,
i am running into the exact same problems when using solo on prefiltered loomfiles from the kallisto|bustools python implementation. @marzamKI, did you find a solution to your problem?
This is the Loomfile structure, if it helps by any chance:
>>> Bl6.adata
AnnData object with n_obs × n_vars = 198891 × 55487
var: 'gene_name'
layers: 'matrix', 'spliced', 'unspliced'
>>> adata.var.index
Index(['ENSMUSG00000079800.2', 'ENSMUSG00000079192.2', 'ENSMUSG00000094799.1',
'ENSMUSG00000079794.2', 'ENSMUSG00000095092.1', 'ENSMUSG00000079190.3',
'ENSMUSG00000095672.1', 'ENSMUSG00000094514.1', 'ENSMUSG00000095787.1',
'ENSMUSG00000095250.1',
...
'ENSMUSG00000103524.1', 'ENSMUSG00000103796.1', 'ENSMUSG00000103757.1',
'ENSMUSG00000106618.1', 'ENSMUSG00000118466.1', 'ENSMUSG00000118447.1',
'ENSMUSG00000118422.1', 'ENSMUSG00000118472.1', 'ENSMUSG00000118404.1',
'ENSMUSG00000118417.1'],
dtype='object', length=55487)
>>> adata.obs.index
Index(['AAACCCAAGAAACCCG', 'AAACCCAAGACAACTA', 'AAACCCAAGACGCAGT',
'AAACCCAAGACGGTTG', 'AAACCCAAGACTCTTG', 'AAACCCAAGAGCAACC',
'AAACCCAAGAGTCTGG', 'AAACCCAAGAGTCTTC', 'AAACCCAAGCACCGTC',
'AAACCCAAGCACTCGC',
...
'TTTGTTGTCTCAACGA', 'TTTGTTGTCTCATTTG', 'TTTGTTGTCTGGCTGG',
'TTTGTTGTCTGTAACG', 'TTTGTTGTCTGTCTCG', 'TTTGTTGTCTGTGCAA',
'TTTGTTGTCTGTGCTC', 'TTTGTTGTCTGTTGGA', 'TTTGTTGTCTTACTGT',
'TTTGTTGTCTTCACGC'],
dtype='object', length=198891)
from solo.
So sorry about the slow response. Working on this today.
from solo.
@marzamKI @scSeqLiubice I'm unable to recreate this error with the L6_Immature_Neurons loom file from http://loom.linnarssonlab.org/.
Do you get the same results if you run the following:
import scvi
from scvi.dataset import AnnDatasetFromAnnData, LoomDataset, \
GeneExpressionDataset, Dataset10X
scvi_data = LoomDataset(data_path)
on its own?
Again sorry about the slow response.
from solo.
Which version of solo-sc
are you both using? If not using the current version in master could you try using that version?
Here is how to install it:
git clone [email protected]:calico/solo.git && cd solo && conda create -n solo python=3.6 && conda activate solo && pip install -e .
from solo.
Hi @njbernstein,
really appreciate your response!
I'm using solo-sc : 0.6
, but i did not use conda for installing and instead directly used pip install -e .
I tried using scvi, and i am getting the same error while removing non expressing cells. So maybe this issue is more scvi related?
>>> scvi_data=LoomDataset(pth + '/counts_unfiltered.Bl6.46/adata.loom')
[2021-02-04 10:08:47,833] INFO - scvi.dataset.loom | Preprocessing dataset
[2021-02-04 10:11:47,726] WARNING - scvi.dataset.loom | Removing non-expressing cells
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.8/site-packages/scvi/dataset/loom.py", line 62, in __init__
super().__init__(
File "/usr/local/lib/python3.8/site-packages/scvi/dataset/dataset.py", line 2026, in __init__
self.populate()
File "/usr/local/lib/python3.8/site-packages/scvi/dataset/loom.py", line 138, in populate
data = ds[:, select].T # change matrix to cells by genes
File "/usr/local/lib/python3.8/site-packages/loompy/loompy.py", line 206, in __getitem__
return self.layers[""][slice_]
File "/usr/local/lib/python3.8/site-packages/loompy/loom_layer.py", line 88, in __getitem__
return self.ds._file['/matrix'].__getitem__(slice)
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "/usr/local/lib/python3.8/site-packages/h5py/_hl/dataset.py", line 777, in __getitem__
selection = sel.select(self.shape, args, dataset=self)
File "/usr/local/lib/python3.8/site-packages/h5py/_hl/selections.py", line 82, in select
return selector.make_selection(args)
File "h5py/_selector.pyx", line 272, in h5py._selector.Selector.make_selection
File "h5py/_selector.pyx", line 183, in h5py._selector.Selector.apply_args
TypeError: Indexing arrays must have integer dtypes
Package incompatibilities? I'm using scvi : 0.6.7
Thanks for your work on this!
Edit:
I reread your comment and saw that you specifically create a Python3.6 env. I installed it into python3.8, i will use the approach for python3.6 and retry it again.
from solo.
@scSeqLiubice 0.6.7
should work. I'm gonna change the default to that.
Can you preprocess your dataset to remove empty cells?
If not can you can send me your data so I can troubleshoot more easily?
@marzamKI I believe changing the scVI version to 0.6.7
should solve your issue.
from solo.
Hi,
I had the same issue but I work it around using older versions of numpy and h5py. I'm using python v3.7.
@marzamKI try to uninstall numpy and h5py and then do:pip install h5py==2.10.0 pip install numpy==1.19.5
In my case, when I run solo jsonfile.json dataset.loom again, I don't have the
TypeError: Indexing arrays must have integer
anymore, solo finish preprocessing of the data and start training of the neural network.
It seems to be an issue of h5py/numpy, see here.Best,
Carlo
Hi! I had the same issue and this worked for me. Thanks!
from solo.
@davek44 can you close this out?
from solo.
Related Issues (20)
- moving to scvi-tools
- Difference between is_doublet and preds HOT 2
- h5ad for HashSolo & solo .pdf plots output HOT 2
- Running error: "Resource temporarily unavailable" HOT 2
- Finding solo installed version HOT 2
- Error on new solo version HOT 8
- Solo on 10x genomics scRNA data HOT 3
- Allow user to change interval at which validation loss is checked
- python 3.6 incompatibility HOT 5
- Solo encountering Nan values with 10x data HOT 7
- Newbie questions: warning message, model parameters, and outputs HOT 5
- Problem with hashsolo HOT 10
- Problem with solo - PyTorch Lightning HOT 4
- Solo in line? HOT 3
- Hashsolo failing when only two HTOs are present? HOT 5
- Error using h5ad file HOT 2
- Issues with hashsolo
- hashsolo requires dense array
- AttributeError: 'numpy.ndarray' object has no attribute 'loc' when running solo on the test dataset HOT 1
- Dependency conflict: lightning 2.1.4 and scvi-tools 1.1.2 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 solo.