-
Notifications
You must be signed in to change notification settings - Fork 612
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
Can't read in protein antibody capture data #3113
Comments
Hi, I just wanted to follow up on this. |
Hi, I don’t have much experience with that data. Does squidpy work better? https://squidpy.readthedocs.io/en/stable/api/squidpy.read.visium.html scanpy doesn’t have much support for spatial analysis, squidpy is built for it. |
Hi, let me give that a shot. |
Hi, I tried that and got this error. I think it's because it's recognizing both antibody data and gene data and throwing an error. ---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[7], line 13
11 key = get_second_to_last_split(path)
12 print(key)
---> 13 adata = sq.read.visium(path, count_file='filtered_feature_bc_matrix.h5', load_images=True)
15 # Create unique cell identifiers
16 adata.obs_names = f'sample_{key}_' + adata.obs_names
File /bgfs/alee/LO_LAB/Personal/Alexander_Chang/alc376/envs/popari_env/lib/python3.12/site-packages/squidpy/read/_read.py:67, in visium(path, counts_file, library_id, load_images, source_image_path, **kwargs)
34 """
35 Read *10x Genomics* Visium formatted dataset.
36
(...)
64 - :attr:`anndata.AnnData.uns` ``['spatial']['{library_id}']['metadata']`` - various metadata.
65 """ # noqa: E501
66 path = Path(path)
---> 67 adata, library_id = _read_counts(path, count_file=counts_file, library_id=library_id, **kwargs)
69 if not load_images:
70 return adata
TypeError: squidpy.read._utils._read_counts() got multiple values for keyword argument 'count_file' |
Hi, @flying-sheep I've tagged you in the merge request. The reason why this function is necessary in Scanpy is because Visium allows for antibody capture data as well. This fix neatly resolves it. Please let me know if there's anything I need to do to get the merge approved. We have a project using protein and gex data being submitted soon and we would ideally like the pip install be able to pull directly from a version of scanpy that has this functionality. |
Hi, sorry that I didn’t answer earlier: we decided to deprecate scanpy’s spatial functions in favor of squidpy: scanpy/src/scanpy/readwrite.py Lines 394 to 395 in de75ed9
I’m happy to help fix the error you encounter there! |
OK, moved it to scverse/squidpy#940 |
Please make sure these conditions are met
What happened?
I'm trying to read in visium data with antibody capture data but for some reason the antibody capture data is not registering. Is there something I'm doing wrong? I couldn't find documentation on how to do this. Although I do see the antibody capture data in the web_summary.html
However read_10x_mtx method works directly on the folder, is there a way to add gex_only functionality to the read_visium function?
Minimal code sample
Error output
Versions
The text was updated successfully, but these errors were encountered: