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

Ensure counts are ints #52

Merged
merged 8 commits into from
Jul 15, 2024
Merged

Ensure counts are ints #52

merged 8 commits into from
Jul 15, 2024

Conversation

maxiallard
Copy link
Contributor

No description provided.

Assert this for all RNA models by also setting
the adata.obs['total_counts'] to the sum of the
counts by following the naming convention from
scanpy.
"total_counts". This is closer to how scanpy
does it and thus reduces confusion.
"total_counts" which is now automatically set for
all HyenaRNA models.
a np array and a csr matrix.
@bputzeys
Copy link
Collaborator

  • this ensures counts in .X are ints
  • this is tested for normal np array but also for csr
  • n_counts is renamed to total_counts for Geneformer specifically
  • all RNA models automatically get a column called total_counts which is how scanpy also defines it

@bputzeys bputzeys self-requested a review July 15, 2024 12:53
@bputzeys bputzeys merged commit 232c7c5 into main Jul 15, 2024
1 check passed
@bputzeys bputzeys deleted the ensure-counts-are-ints branch July 15, 2024 13:02
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.

2 participants