Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zktuong committed Feb 17, 2024
1 parent cc6baac commit 669cbb5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ktplotspy/plot/plot_cpdb_heatmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def plot_cpdb_heatmap(
) # in v5, there are 12 columns before the values
all_int = all_intr.iloc[:, col_start : all_intr.shape[1]].T
all_int.columns = intr_pairs
if cell_types is not None:
if cell_types is None:
cell_types = sorted(list(set([y for z in [x.split(DEFAULT_CPDB_SEP) for x in all_intr.columns[col_start:]] for y in z])))
cell_types_comb = ["|".join(list(x)) for x in list(product(cell_types, cell_types))]
cell_types_keep = [ct for ct in all_int.index if ct in cell_types_comb]
Expand Down
6 changes: 3 additions & 3 deletions tests/test_plot_cpdb_heatmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ def test_plot_cpdb_heatmap_return(adata, pvals):

@patch("matplotlib.pyplot.show")
@pytest.mark.usefixtures("adata", "pvals")
def test_plot_cpdb_heatmap_celltypes(mock_show, adata, pvals):
def test_plot_cpdb_heatmap_celltypes(mock_show, adata, pvals_v5):
g = plot_cpdb_heatmap(
pvals=pvals,
cell_types=["CD4 T cell", "CD8 T cell", "B cell"],
pvals=pvals_v5,
cell_types=["iEVT", "PV MYH11", "PV STEAP4", "EVT_1"],
)
g

0 comments on commit 669cbb5

Please sign in to comment.