Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small bug fixes and docs improvements #409

Merged
merged 2 commits into from
Oct 22, 2023
Merged

Small bug fixes and docs improvements #409

merged 2 commits into from
Oct 22, 2023

Conversation

Lilly-May
Copy link
Collaborator

PR Checklist

  • Documentation in docs is updated

Description of changes

Some small bug fixes and docs improvements which I noticed would be useful during the creation of the docs examples. I made the following changes:

  • Changed pt.pl.dl.pairplot to a static method (and deleted the self parameter). Before, it was necessary to create a DialoguePlot object and then call the pairplot method using the created object. Now, the method can be called directly with pt.pl.dl.pairplot which matches the convention we have for creating plots so far. The example in the docs was updated as well.
  • Fixed error message in subtract and add methods of PerturbationSpace object. Before, the error messages always printed that the reference_key is missing in adata.obs_names, although the test checks for the presence of the perturbations.
  • Fixed error message for embedding_key in compute_control_diff of PerturbationSpace. Before, it printed that the reference key is missing instead of the embedding_key.
  • Added target_col parameter in add and subtract methods of PerturbationSpace object. The reason for this is that the method compute_control_diff is called by add as well as subtract and if there’s no option to set target_col, it will always default to “perturbations” which would make it necessary to rename the column if it is not named that way in the adata by default. Since the default of the parameter is set to “perturbations” in add and subtract, nothing changes if the methods were already working with your data.
  • Added docs parameter description for **kwargs for DBSCANSpace.computeand PseudobulkSpace.compute
  • Set default values for cluster_key for KMeansSpace.compute and DBSCANSpace.compute directly in the method signature (to 'k-means' and 'dbscan' respectively). This saves checking if the parameter is none and, if so, setting it to the default value. Also, for DBSCAN, the docs claimed the default value is ‘k-means’, which I corrected to ‘dbscan’
  • Added docs explanations for all parameters for pt.pl.scg.reg_mean_plot and pt.pl.scg.reg_var_plot

Lilly-May and others added 2 commits October 22, 2023 16:50
… static method, fixed error messages in substract and add methods of PerturbationSpace, added docs parameter description for DBSCANSpace.compute and PseudobulkSpace.compute, added docs explanations for all parameters for pt.pl.scg.reg_mean_plot and pt.pl.scg.reg_var_plot
@github-actions github-actions bot added the bug Something isn't working label Oct 22, 2023
@codecov
Copy link

codecov bot commented Oct 22, 2023

Codecov Report

Merging #409 (f0e24b0) into main (e2ff0f8) will not change coverage.
The diff coverage is 0.00%.

Additional details and impacted files
@@          Coverage Diff          @@
##            main    #409   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files         40      40           
  Lines       4885    4882    -3     
=====================================
+ Misses      4885    4882    -3     
Files Coverage Δ
pertpy/plot/_scgen.py 0.00% <ø> (ø)
pertpy/tools/_perturbation_space/_simple.py 0.00% <ø> (ø)
pertpy/plot/_dialogue.py 0.00% <0.00%> (ø)
...y/tools/_perturbation_space/_perturbation_space.py 0.00% <0.00%> (ø)

Copy link
Member

@Zethson Zethson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Absolutely amazing! Really appreciate you digging through all of this and improving the minor things.

Thanks!

@Zethson Zethson merged commit 62f8b14 into main Oct 22, 2023
7 of 8 checks passed
@Lilly-May Lilly-May deleted the small_improvements branch October 25, 2023 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants