angelolab / Nimbus

Other
12 stars 1 forks source link

Implemented subset plots #24

Closed JLrumberger closed 2 years ago

JLrumberger commented 2 years ago

What is the purpose of this PR?

This PR closes #23 . It contains code to prepare facet plots for arbitrary subsets of the cell-level predictions to get a clearer picture of error cases.

How did you implement your changes

I added functions collapse_activity_dfs, subset_activity_df and subset_plots to plot_utils.py and changed calc_metrics so that it does not internally defines function calc_scores, instead calc_scores is defined as a normal function so that I can get imported by subset_plots.

Remaining issues

None

JLrumberger commented 2 years ago

Found a small error when applying the code on real data, so I'll upload an updated version within the next couple of minutes.