Generalize tl.dendrogram function to either axis
- [X] Closes #1549
- [X] Tests included or not required because:
- Added regression test for subsetting var_names
- Added test for when groupby is None
- [ ] Release notes not necessary because:
Codecov Report
Attention: 6 lines in your changes are missing coverage. Please review.
Comparison is base (
ddeb820) 74.56% compared to head (521a590) 74.65%. Report is 7 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #2771 +/- ##
==========================================
+ Coverage 74.56% 74.65% +0.08%
==========================================
Files 115 115
Lines 12713 12783 +70
==========================================
+ Hits 9480 9543 +63
- Misses 3233 3240 +7
| Files | Coverage Δ | |
|---|---|---|
| scanpy/plotting/_anndata.py | 84.93% <100.00%> (-0.06%) |
:arrow_down: |
| scanpy/plotting/_baseplot_class.py | 89.88% <100.00%> (ø) |
|
| scanpy/tools/_utils.py | 70.58% <85.71%> (+0.96%) |
:arrow_up: |
| scanpy/tools/_dendrogram.py | 88.40% <89.58%> (+1.73%) |
:arrow_up: |
OK, updated this so it follows the decision implemented in #1244
@flying-sheep the first is easy to fix. For 2. , it's not clear to me what you're asking for here. It's been a while since I worked on this. Am I supposed to import this function in the __init__.py for tl and pl?
Hi Dan, about 1.: I’m asking you what the semantic meaning is :smile:
about 2.: there are two functions called dendrogram, and they have compatible signatures. Each computed dendrogram can be plotted. So what I’m saying is that the plotting version hasn’t been adapted.
Also an important question: in tl.dendrogram, we call _choose_representation, which will compute a PCA for the .obs axis. When specifying axis='var', should it compute a PCA for the var axis instead?