-
Notifications
You must be signed in to change notification settings - Fork 593
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
Read multiple 10X files #267
Comments
I don't know how they do it Seurat, but I'd simply do
Does this help? |
Hi, thanks for the reply. This example helps already. Thanks. I was thinking more about importing multiple samples from 10X where for each sample you have a folder containing the three files (matrix, barcodes, genes). But I guess I can do something to convert those into .h5 prior to read them into scanpy. |
You can do the same as above using PS: Note that I edited the example above to show |
Many thanks!!! |
Hi falexwolf, I try to use concatenate to read multiple 10X mtx and put them together. |
Hi @falexwolf, thanks for the solution you provided above for reading multiple files. I tried it and it worked when I had just 2 files. I am trying the same code with 23 files and I am getting an error message in the concatenation step. Any idea on how to fix this ? Thanks. AttributeError Traceback (most recent call last) /Applications/anaconda3/lib/python3.7/site-packages/anndata/core/anndata.py in concatenate(self, join, batch_key, batch_categories, index_unique, *adatas) AttributeError: 'numpy.ndarray' object has no attribute 'getformat' |
Hi @elfore, were you able to concatenate your files successfully ? If yes, could you please share the code you used for concatenation ? Thanks. |
If I do this : adata = adata1.concatenate (adata2, adata3). How can I keep the original sample names in adata? Thx! |
@taopeng1100, this should work: adata = adata1.concatenate(adata2, adata3, index_unique=None) |
Hello, I am having problems with reading in multiple h5 files using the code snipped that was posted by falexwolf. I am doing:
With or without the batch_key and batch_categories arguments I get the same error:
Loading a single h5 file works and produces expected output:
So the input files appear to be valid I just can't get them to concatenate to a single object. Any ideas would be welcome. |
Hi @BrianLohman , I had the same problem, and this might help you. |
HI, I tried to do what you suggested but I am getting an error saying
and this produces the above error. Can anyone help? |
Hi,
Maybe this is somewhere in the manual and I just don't see it. But is there a way to read multiple 10X samples (either multiple .h5 or the matrix/genes/barcodes) in the same way that Seurat does with its Read10X() function?
The text was updated successfully, but these errors were encountered: