72 # Calculate chunk frames
73 max_chunk = floor(CONST_MAX_SIZE / n_cells)
---> 75 for left in range(0, n_genes, max_chunk):
76 right = min(left + max_chunk, n_genes)
78 df = pd.DataFrame(data=get_chunk(X, left, right))
ValueError: range() arg 3 must not be zero
Please make sure these conditions are met
What happened?
Running
rank_genes_groups
function with a dataset with more than 10 million cells would fail sinceMAX_SIZE
is hardcoded here: https://github.com/scverse/scanpy/blob/751eafac9259edfacf083b0ffff268ca93182cd9/src/scanpy/tools/_rank_genes_groups.py#L51I tried doing it and here's the error:
Minimal code sample
Error output
Versions