You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pertpy/tools/_mixscape.py
+21-11Lines changed: 21 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -672,6 +672,7 @@ def plot_perturbscore( # pragma: no cover
672
672
target_gene: str,
673
673
mixscape_class="mixscape_class",
674
674
color="orange",
675
+
palette: dict[str, str] =None,
675
676
split_by: str=None,
676
677
before_mixscape=False,
677
678
perturbation_type: str="KO",
@@ -688,11 +689,13 @@ def plot_perturbscore( # pragma: no cover
688
689
target_gene: Target gene name to visualize perturbation scores for.
689
690
mixscape_class: The column of `.obs` with mixscape classifications.
690
691
color: Specify color of target gene class or knockout cell class. For control non-targeting and non-perturbed cells, colors are set to different shades of grey.
692
+
palette: Optional full color palette to overwrite all colors.
691
693
split_by: Provide the column `.obs` if multiple biological replicates exist to calculate
692
694
the perturbation signature for every replicate separately.
693
695
before_mixscape: Option to split densities based on mixscape classification (default) or original target gene classification.
694
696
Default is set to NULL and plots cells by original class ID.
695
-
perturbation_type: specify type of CRISPR perturbation expected for labeling mixscape classifications. Defaults to `KO`.
697
+
perturbation_type: Specify type of CRISPR perturbation expected for labeling mixscape classifications.
698
+
Defaults to `KO`.
696
699
697
700
Returns:
698
701
The ggplot object used for drawn.
@@ -721,7 +724,7 @@ def plot_perturbscore( # pragma: no cover
0 commit comments