openproblems-bio / openproblems

Formalizing and benchmarking open problems in single-cell genomics
MIT License
290 stars 77 forks source link

Fix references to `adata.layers["counts"]` #698

Closed scottgigante-immunai closed 1 year ago

scottgigante-immunai commented 1 year ago

Closes #695. Passing tests at https://tower.nf/orgs/openproblems-bio/workspaces/openproblems-bio/watch/dT1xNqkuxAH9R

codecov[bot] commented 1 year ago

Codecov Report

Base: 95.03% // Head: 95.05% // Increases project coverage by +0.01% :tada:

Coverage data is based on head (83f3976) compared to base (6b50d48). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #698 +/- ## ========================================== + Coverage 95.03% 95.05% +0.01% ========================================== Files 152 153 +1 Lines 4052 4062 +10 Branches 206 206 ========================================== + Hits 3851 3861 +10 Misses 131 131 Partials 70 70 ``` | Flag | Coverage Δ | | |---|---|---| | unittests | `94.95% <100.00%> (+0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openproblems-bio#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://codecov.io/gh/openproblems-bio/openproblems/pull/698?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openproblems-bio) | Coverage Δ | | |---|---|---| | [openproblems/data/immune\_cells.py](https://codecov.io/gh/openproblems-bio/openproblems/pull/698/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openproblems-bio#diff-b3BlbnByb2JsZW1zL2RhdGEvaW1tdW5lX2NlbGxzLnB5) | `100.00% <ø> (ø)` | | | [openproblems/data/pancreas.py](https://codecov.io/gh/openproblems-bio/openproblems/pull/698/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openproblems-bio#diff-b3BlbnByb2JsZW1zL2RhdGEvcGFuY3JlYXMucHk=) | `96.55% <ø> (-0.12%)` | :arrow_down: | | [...batch\_integration/batch\_integration\_feature/api.py](https://codecov.io/gh/openproblems-bio/openproblems/pull/698/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openproblems-bio#diff-b3BlbnByb2JsZW1zL3Rhc2tzL19iYXRjaF9pbnRlZ3JhdGlvbi9iYXRjaF9pbnRlZ3JhdGlvbl9mZWF0dXJlL2FwaS5weQ==) | `100.00% <ø> (ø)` | | | [...sks/spatial\_decomposition/datasets/destvi/utils.py](https://codecov.io/gh/openproblems-bio/openproblems/pull/698/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openproblems-bio#diff-b3BlbnByb2JsZW1zL3Rhc2tzL3NwYXRpYWxfZGVjb21wb3NpdGlvbi9kYXRhc2V0cy9kZXN0dmkvdXRpbHMucHk=) | `94.30% <ø> (-0.10%)` | :arrow_down: | | [...lems/tasks/\_cell\_cell\_communication/\_common/api.py](https://codecov.io/gh/openproblems-bio/openproblems/pull/698/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openproblems-bio#diff-b3BlbnByb2JsZW1zL3Rhc2tzL19jZWxsX2NlbGxfY29tbXVuaWNhdGlvbi9fY29tbW9uL2FwaS5weQ==) | `89.52% <100.00%> (-0.10%)` | :arrow_down: | | [...l\_cell\_communication/\_common/metrics/odds\_ratio.py](https://codecov.io/gh/openproblems-bio/openproblems/pull/698/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openproblems-bio#diff-b3BlbnByb2JsZW1zL3Rhc2tzL19jZWxsX2NlbGxfY29tbXVuaWNhdGlvbi9fY29tbW9uL21ldHJpY3Mvb2Rkc19yYXRpby5weQ==) | `100.00% <100.00%> (ø)` | | | [.../tasks/dimensionality\_reduction/methods/densmap.py](https://codecov.io/gh/openproblems-bio/openproblems/pull/698/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openproblems-bio#diff-b3BlbnByb2JsZW1zL3Rhc2tzL2RpbWVuc2lvbmFsaXR5X3JlZHVjdGlvbi9tZXRob2RzL2RlbnNtYXAucHk=) | `100.00% <100.00%> (ø)` | | | [...tasks/dimensionality\_reduction/methods/neuralee.py](https://codecov.io/gh/openproblems-bio/openproblems/pull/698/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openproblems-bio#diff-b3BlbnByb2JsZW1zL3Rhc2tzL2RpbWVuc2lvbmFsaXR5X3JlZHVjdGlvbi9tZXRob2RzL25ldXJhbGVlLnB5) | `85.10% <100.00%> (+0.32%)` | :arrow_up: | | [...lems/tasks/dimensionality\_reduction/methods/pca.py](https://codecov.io/gh/openproblems-bio/openproblems/pull/698/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openproblems-bio#diff-b3BlbnByb2JsZW1zL3Rhc2tzL2RpbWVuc2lvbmFsaXR5X3JlZHVjdGlvbi9tZXRob2RzL3BjYS5weQ==) | `100.00% <100.00%> (ø)` | | | [...ms/tasks/dimensionality\_reduction/methods/phate.py](https://codecov.io/gh/openproblems-bio/openproblems/pull/698/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openproblems-bio#diff-b3BlbnByb2JsZW1zL3Rhc2tzL2RpbWVuc2lvbmFsaXR5X3JlZHVjdGlvbi9tZXRob2RzL3BoYXRlLnB5) | `100.00% <100.00%> (ø)` | | | ... and [6 more](https://codecov.io/gh/openproblems-bio/openproblems/pull/698/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openproblems-bio) | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openproblems-bio). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openproblems-bio)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

scottgigante-immunai commented 1 year ago

This PR should solve the ambiguity around layers["counts"]. cc @adamgayoso.

@lazappi @LuckyMD I had to change the way the HVG normalizer works for this, so now subsetting is not done inside the normalizer. I think that makes more sense given the way we're using .layers for normalizations, we shouldn't really be performing a subset in there as well.