Hi All,
While working with squidpy recently and encountered for “complex” genes (two genes appended with an underscore between) by default squidpy is keeping the lowly expressed gene among the complex. Is there a reason behind such a filtering?
Relevant code here
if "_" not in _complex:
return _complex
complexes = [c for c in _complex.split("_") if c in self._data.columns]
if not len(complexes):
return None
if len(complexes) == 1:
return complexes[0]
df = self._data[complexes].mean()
return str(df.index[df.argmin()])
if TYPE_CHECKING:
assert isinstance(self._interactions, pd.DataFrame)
assert isinstance(self.interactions, pd.DataFrame)
if complex_policy == ComplexPolicy.MIN:
logg.debug("DEBUG: Selecting genes from complexes based on minimum average expression")
self.interactions[SOURCE] = self.interactions[SOURCE].apply(find_min_gene_in_complex)
self.interactions[TARGET] = self.interactions[TARGET].apply(find_min_gene_in_complex)
elif complex_policy == ComplexPolicy.ALL: