scanpy icon indicating copy to clipboard operation
scanpy copied to clipboard

Generalize tl.dendrogram function to either axis

Open dburkhardt opened this issue 2 years ago • 4 comments

  • [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:

dburkhardt avatar Nov 28 '23 16:11 dburkhardt

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:

... and 9 files with indirect coverage changes

codecov[bot] avatar Nov 28 '23 17:11 codecov[bot]

OK, updated this so it follows the decision implemented in #1244

flying-sheep avatar Jan 18 '24 14:01 flying-sheep

@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?

dburkhardt avatar Feb 15 '24 20:02 dburkhardt

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?

flying-sheep avatar Feb 16 '24 08:02 flying-sheep