Skip to content

Conversation

dorien-er
Copy link
Contributor

Changelog

... Describe your changes ...

Issue ticket number and link

Closes #xxxx (Replace xxxx with the GitHub issue number)

Checklist before requesting a review

  • I have performed a self-review of my code

  • Conforms to the Contributor's guide

  • Check the correct box. Does this PR contain:

    • Breaking changes
    • New functionality
    • Major changes
    • Minor changes
    • Documentation
    • Bug fixes
  • Proposed changes are described in the CHANGELOG.md

  • CI tests succeed!

row_sums = layer.sum(axis=1)
exp_row_sums = exp_layer.sum(axis=1)

is_normalized = np.allclose(row_sums, 1)
Copy link
Member

Choose a reason for hiding this comment

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

I don't think is_normalized is asserted correctly here. Normalization scales the raw counts such that the sum of the counts for each cell are equal to a number. With CPM (counts per million) this is number is 1 milion, but the scanpy method is to use the median of total counts before normalization. So this number can differ, its not just 1

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