My recommendation is to report the issue directly on the ScanPy
Github page here: https://github.com/scverse/scanpy/issues
This is a shortingshortcoming with the testing of the algorithm, without any question. Replicates with experimental modification are standard procedure in this line of analysis. For example, one mousein vitro cell culture does not receive the drug therapy, i.e. a control, and the rest do, which results in one group with a complete absence of a transcript profile. The authors simply have not described this possibility in any of their documentation and therefore may not have originally considered it.
What I suspect has happened is the authorship only tested extensive and complete data - like really big data sets. "BigData" is what ScanPy
is targeting because they look to have adapted to large data in Wolf et al Genome Biology 2018 paper, notably by specifying how quick their algorithm performs with increasing data set size.
What I suspect has happened is that smaller data sets, with experimental replication and modification, were not tested so these issues simply get missed. It's easy to overlook, the authors can't think of everything.
The authors of ScanPy
are responding to issues arising unevenly. So it will be hit and miss whether they respond. Similar issues should have been reported to them before because its a common wet-lab experimental design. However, I've not checked their full intray.
They should provide the bit of code that will prevent the tedium described above, but then again they may not. If they do, please do write back. The whole ScanPy
project is interesting.