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

More on basic input validation #73

Open
mbabadi opened this issue Jul 23, 2024 · 1 comment
Open

More on basic input validation #73

mbabadi opened this issue Jul 23, 2024 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@mbabadi
Copy link
Member

mbabadi commented Jul 23, 2024

I anticipate that a lot of user error will be due to giving CAS normalized counts data. Unfortunately, we cannot rely on dtype for that: I have seen too many AnnData files with float32 that contain integer counts. Heck, I do that myself all the time :D

A quick a dirty validation is to sample x percent (x ~ 5 to 10) of non-zero counts counts (easy if sparse, a bit more expensive if dense), and ensure that their decimal is < 1e-3. Otherwise, raise an exception with an informative error message. We can also have a flag to disable input data integralness validation (set to False by default) for those who know what they're doing.

@mbabadi mbabadi added enhancement New feature or request good first issue Good for newcomers labels Jul 23, 2024
@mdmanurung
Copy link

I upvote this. The error message is not informative, though I can find out what's wrong by going through the provided vignette.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants