Skip to content
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

rename count_file in internal API to counts_file #944

Merged
merged 2 commits into from
Jan 29, 2025
Merged

Conversation

flying-sheep
Copy link
Member

Description

rename the count_file argument in the internal _read_counts to match the counts_file (with “s”) in the public API.

This changes the error message when it’s wrongly specified from

TypeError: squidpy.read._utils._read_counts() got multiple values for keyword argument 'count_file'

to

TypeError: squidpy.read._read.visium() got an unexpected keyword argument 'count_file'. Did you mean 'counts_file'?

How has this been tested?

CI

Closes

Fixes #940, but let’s wait for @alexanderchang1 to confirm

@alexanderchang1
Copy link

Hi, sorry, the conversation got mixed up between the Issue and the pull request. This probably fixes this bug, and looks good to me.

But a broader function I need is for Squidpy to read in Antibody Capture Data as well, which 10x Genomics offers for their Visium platform and is developing for their Visium HD platform. I reviewed the Squidpy function and the kwargs seem to now correctly being passed all the way back to the read_10x_h5 function pulled from Scanpy. Previously the Scanpy version of read visium did not. The previous PR I put in fixed that issue, I can test it once this goes through.

@flying-sheep
Copy link
Member Author

squidpy.read.visium(counts_file=..., gex_only=False) should work already with the released version of squidpy!

@alexanderchang1
Copy link

Thank you so much! I will update my squidpy. Thanks again for all your help.

@timtreis
Copy link
Member

Hey @alexanderchang1, does it work?

But a broader function I need is for Squidpy to read in Antibody Capture Data as well, which 10x Genomics offers for their Visium platform and is developing for their Visium HD platform.

Generally, we're working towards making SpatialData the default container that Squidpy uses and are therefore pivoting a lot of the reading capabilities into https://spatialdata.scverse.org/projects/io/en/latest/

Copy link
Member

@timtreis timtreis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@timtreis timtreis merged commit e77237c into main Jan 29, 2025
8 checks passed
@alexanderchang1
Copy link

@timtreis It does! Will the old scanpy spatial plotting functions still be compatible with SpatialData objects? We have a paper going in that uses Scanpy and Anndata to demonstrate a lot of the package utility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't read in protein antibody capture data
3 participants