first, it is different from the CPU version of filtering, where we filter cells first and genes second.
Second, if we are selecting a subset of cells (e.g. 50K, 250K) from the 1M cell dataset, the genes will be filtered based on their occurrence in the whole dataset, instead of only in the subset of selected cells.
In the
preprocess_in_batches
function, we filter genes first, before filtering / subsetting cells. https://github.com/clara-parabricks/rapids-single-cell-examples/blob/master/notebooks/rapids_scanpy_funcs.py#L779This leads to two (minor) discrepancies -