Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
SarahOuologuem committed Mar 28, 2024
1 parent dca2e58 commit 3690f5c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions panpipes/python_scripts/run_filter_spatial.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def test_matching_df_ignore_cat(new_df, old_df):
# remove Nones for each level of filter dict
filter_dict = map_nested_dicts_remove_none(filter_dict)
filter_dict = dictionary_stripper(filter_dict)
L.info("filter dictionary:\n %s" %filter_dict)
L.info("Filter dictionary:\n %s" %filter_dict)

# load mudata

Expand Down Expand Up @@ -106,17 +106,17 @@ def test_matching_df_ignore_cat(new_df, old_df):
if marg == "obs":
if "max" in filter_dict[mod][marg].keys():
for col, n in filter_dict[mod][marg]['max'].items():
L.info("Filtering cells of modality '%s' by '%s' in obs to less than %s" % (mod, col, n))
L.info("Filtering cells of modality '%s' by '%s' in .obs to less than %s" % (mod, col, n))
mu.pp.filter_obs(mdata.mod[mod], col, lambda x: x <= n)
L.info("Remaining cells: %d" % mdata[mod].n_obs)
if "min" in filter_dict[mod][marg].keys():
for col, n in filter_dict[mod][marg]['min'].items():
L.info("Filtering cells of modality '%s' by '%s' in obs to more than %s" % (mod, col, n))
L.info("Filtering cells of modality '%s' by '%s' in .obs to more than %s" % (mod, col, n))
mu.pp.filter_obs(mdata.mod[mod], col, lambda x: x >= n)
L.info("Remaining cells: %d" % mdata[mod].n_obs)
if "bool" in filter_dict[mod][marg].keys():
for col, n in filter_dict[mod][marg]['bool'].items():
L.info("Filtering cells of modality '%s' by '%s' in obs marked %s" % (mod, col, n))
L.info("Filtering cells of modality '%s' by '%s' in .obs marked %s" % (mod, col, n))
mu.pp.filter_obs(mdata.mod[mod], col, lambda x: x == n)
L.info("Remaining cells: %d" % mdata[mod].n_obs)
if marg == "var":
Expand Down

0 comments on commit 3690f5c

Please sign in to comment.