From 8ec715a924f16caeb0e97f71bdc5d860b891d342 Mon Sep 17 00:00:00 2001 From: SarahOuologuem Date: Mon, 26 Feb 2024 12:11:38 +0000 Subject: [PATCH] add check --- panpipes/python_scripts/run_scanpyQC_spatial.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panpipes/python_scripts/run_scanpyQC_spatial.py b/panpipes/python_scripts/run_scanpyQC_spatial.py index f12a85f4..a7067d54 100644 --- a/panpipes/python_scripts/run_scanpyQC_spatial.py +++ b/panpipes/python_scripts/run_scanpyQC_spatial.py @@ -129,7 +129,7 @@ percent_top = [x for x in percent_top if x <= spatial.n_vars] sc.pp.calculate_qc_metrics(spatial, qc_vars=qc_vars, percent_top=percent_top, inplace=True) -if args.spatial_filetype == "vizgen": +if (args.spatial_filetype == "vizgen") and ("blank_genes" in spatial.obsm): spatial.obsm["blank_genes"].to_numpy().sum() / spatial.var["total_counts"].sum() * 100 # Calculate cc scores