Skip to content

Commit

Permalink
check dsb bg obj in run_preprocess_prot.py
Browse files Browse the repository at this point in the history
  • Loading branch information
wlason authored Oct 15, 2024
1 parent 6f87e72 commit 6ea37e9
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions panpipes/python_scripts/run_preprocess_prot.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,9 @@
sys.exit("You must specify a background MuData to run dsb, containing both rna and prot")

# RNA and PROT layer must be present in the object to run dsb
mods = list(all_mdata_bg.mod.keys())
if 'prot' not in mods:
L.error("The MuData you specified does not contain prot modality. Cannot run dsb")
sys.exit("The MuData you specified does not contain prot modality. Cannot run dsb")
if 'rna' not in mods:
if 'rna' not in list(all_mdata_bg.mod.keys()):
L.error("The MuData you specified does not contain rna modality. Cannot run dsb")
sys.exit("The MuData you specified does not contain rna modality. Cannot run dsb")
del mods

# the RNA and PROT must intersect - they won't if experimental design included some cells without PROT data
L.info("Checking that only cells with PROT signal present are in the bacground object")
Expand Down

0 comments on commit 6ea37e9

Please sign in to comment.