scanpy
scanpy copied to clipboard
Added intercept to regress_out()
Added the boolean argument "add_intercept" to regress_out, and implemented code to optionally add the intercept back to the residuals in the result of regress_out().
- [x] Closes https://github.com/theislab/single-cell-tutorial/issues/35
- [ ] Tests included or not required because:
- [ ] Release notes not necessary because:
@LuckyMD
Codecov Report
Merging #2731 (5b9bc72) into master (b23229f) will decrease coverage by
0.01%
. The diff coverage is86.95%
.
Additional details and impacted files
@@ Coverage Diff @@
## master #2731 +/- ##
==========================================
- Coverage 72.87% 72.87% -0.01%
==========================================
Files 110 110
Lines 12100 12107 +7
==========================================
+ Hits 8818 8823 +5
- Misses 3282 3284 +2
Files | Coverage Δ | |
---|---|---|
scanpy/preprocessing/_simple.py | 82.03% <86.95%> (-0.19%) |
:arrow_down: |
Hi! Can you explain a bit what use cases this helps people with? When would one want to set this to True?
Once we have a good example, you can use that to write a small test that checks if it works as intended.
Hi,
I believe @LuckyMD detailed one use case here https://github.com/theislab/single-cell-tutorial/issues/35.
Is this enough to get started?
Thanks for implementing this! I used it to regress out total counts and cell cycle scores before highly variable gene selection, and it worked well. The clusters are better separated without artifacts, unlike running regressing function after HVG.
Is this enough to get started?
For sure, thank you for the context!
Is it possible to add a unit test that checks that with this set to True
, clusters are better separated?