Skip to content

Commit

Permalink
Update heatmap (#1162)
Browse files Browse the repository at this point in the history
Subset genes specified in `gene_order` to ones for which a model has
been fit.
  • Loading branch information
WeilerP committed Feb 25, 2024
1 parent 9e71e13 commit 7c8b9d4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/cellrank/pl/_heatmap.py
Expand Up @@ -362,6 +362,7 @@ def _(gene_order: Optional[Sequence[str]] = None) -> Tuple[List[plt.Figure], pd.

if not cluster_genes:
if gene_order is not None:
gene_order = [gene for gene in gene_order if gene in df.index]
df = df.loc[gene_order]
else:
max_sort = np.argsort(np.argmax(df.apply(_min_max_scale, axis=1).values, axis=1))
Expand Down

0 comments on commit 7c8b9d4

Please sign in to comment.