File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 103
103
else :
104
104
L .error ("You must specify a background MuData to run dsb, containing both rna and prot" )
105
105
sys .exit ("You must specify a background MuData to run dsb, containing both rna and prot" )
106
+
107
+ # RNA and PROT layer must be present in the object to run dsb
108
+ if 'rna' not in list (all_mdata_bg .mod .keys ()):
109
+ L .error ("The MuData you specified does not contain rna modality. Cannot run dsb" )
110
+ sys .exit ("The MuData you specified does not contain rna modality. Cannot run dsb" )
111
+
112
+ # the RNA and PROT must intersect - they won't if experimental design included some cells without PROT data
113
+ L .info ("Checking that only cells with PROT signal present are in the background object" )
114
+ if all_mdata_bg ['rna' ].shape [0 ] != all_mdata_bg ['prot' ].shape [0 ]:
115
+ mu .pp .intersect_obs (mdata_bg )
116
+ all_mdata_bg .update ()
106
117
107
118
# checking that the same proteins are in foreground and background (since foreground might have been filtered)
108
119
L .info ("Checking that the same proteins are in foreground and background" )
You can’t perform that action at this time.
0 commit comments