Small bug fixes and docs improvements #409
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Checklist
docs
is updatedDescription 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:
pt.pl.dl.pairplot
to a static method (and deleted the self parameter). Before, it was necessary to create aDialoguePlot
object and then call the pairplot method using the created object. Now, the method can be called directly withpt.pl.dl.pairplot
which matches the convention we have for creating plots so far. The example in the docs was updated as well.subtract
andadd
methods ofPerturbationSpace
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.compute_control_diff
ofPerturbationSpace
. Before, it printed that the reference key is missing instead of the embedding_key.add
andsubtract
methods ofPerturbationSpace
object. The reason for this is that the methodcompute_control_diff
is called byadd
as well assubtract
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” inadd
andsubtract
, nothing changes if the methods were already working with your data.DBSCANSpace.compute
andPseudobulkSpace.compute
KMeansSpace.compute
andDBSCANSpace.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’pt.pl.scg.reg_mean_plot
andpt.pl.scg.reg_var_plot