From 7bfb4e47ad9176d2e6be19e2d1165738703ae4d9 Mon Sep 17 00:00:00 2001 From: Devika Agarwal <33758226+deevdevil88@users.noreply.github.com> Date: Thu, 25 Jul 2024 19:19:27 +0100 Subject: [PATCH] Update run_filter.py There was an error in the for loop, the same variable wasnt being used acrsos, leading to mistake in the ncells counts. --- panpipes/python_scripts/run_filter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panpipes/python_scripts/run_filter.py b/panpipes/python_scripts/run_filter.py index 5dbd7e73..3ce5fcf0 100644 --- a/panpipes/python_scripts/run_filter.py +++ b/panpipes/python_scripts/run_filter.py @@ -180,7 +180,7 @@ def test_matching_df_ignore_cat(new_df, old_df): # write out the per sample_id cell numbers cell_counts_dict={} for mm in mdata.mod.keys(): - cell_counts_dict[mm] = mdata[mod].obs.sample_id.value_counts().to_frame('n_cells') + cell_counts_dict[mm] = mdata[mm].obs.sample_id.value_counts().to_frame('n_cells') cell_counts = pd.concat(cell_counts_dict).reset_index().rename( columns={"level_0": "modality", "level_1": "sample_id"})