Your R chunk can pipe obs_lung straight in — R sccomp accepts cell metadata and derives counts internally.
sccompPy does not mirror that; it needs the aggregated table your groupby(...).size().reset_index(name="count") builds.
So the pre-count in lines 357–367 matches sccompPy’s documented input format and is necessary unless sccompPy adds cell-level aggregation later.
Your R chunk can pipe obs_lung straight in — R sccomp accepts cell metadata and derives counts internally.
sccompPy does not mirror that; it needs the aggregated table your groupby(...).size().reset_index(name="count") builds.
So the pre-count in lines 357–367 matches sccompPy’s documented input format and is necessary unless sccompPy adds cell-level aggregation later.