From d5d381615dde9e9242b3fe17bbda5dbaac0b5906 Mon Sep 17 00:00:00 2001 From: jvivian Date: Sun, 9 Jun 2024 19:45:52 -0700 Subject: [PATCH] Hot fix for normalization with batches --- covid19_drdfm/streamlit/pages/1_Factor_Analysis.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/covid19_drdfm/streamlit/pages/1_Factor_Analysis.py b/covid19_drdfm/streamlit/pages/1_Factor_Analysis.py index 43d6d19..1016899 100644 --- a/covid19_drdfm/streamlit/pages/1_Factor_Analysis.py +++ b/covid19_drdfm/streamlit/pages/1_Factor_Analysis.py @@ -75,7 +75,7 @@ def normalize(df): ad = ann.read_h5ad(res_dir / "data.h5ad") new = ad.to_df().reset_index() new["State"] = ad.obs["State"].to_list() -new = normalize(new) +new = normalize(new[new.State == state]) # Normalize factors and add to new dataframe if st.sidebar.checkbox("Invert Factor"):