A patch release with one correctness fix and one packaging fix.
Fixed
-
run_cosg_cytome(layer='auto')double-normalised an already-normalised
matrix.autoresolved RNA tolog1pfrom a table keyed on the modality,
without looking at the data. Becausecytome.from_anndatastores whatever
adata.Xheld under{modality}_counts— including a log-normalised
matrix — any file written from normalised input hadlog1papplied a
second time, while the function is documented as equivalent to
cosg.cosg(adata).The damage was quiet rather than obvious: correlation with the in-memory
reference stayed around 0.99, and specificity scores moved by up to
0.11. That is small enough to pass a glance and large enough to change
which genes rank as markers.autonow probes the stored matrix. When it is demonstrably not integer,
the values are used as given — equivalent tolayer='counts', which is what
reproducescosg.cosgon the AnnData the file came from — and a warning
names the override. An explicitlayer=is obeyed untouched. -
The version had two sources of truth.
pyproject.tomland
cosg/__init__.pyeach carried a literal; they agree until a release bumps
one.pyprojectnow declares the version dynamic and reads
cosg.__version__.
Works with cytome 0.3.0
cytome 0.3.0 stops naming a matrix {modality}_counts unless it holds raw
integer counts, so a file converted from normalized data now carries
{modality}_data (or a name the writer chose) and no counts.
layer='auto'recognises that layout and reads the matrix that was
adata.X, naming which one it picked rather than failing on a missing
counts.- Where cytome records
matrix_meta.is_integer, that is preferred over
probing the values here. The writer decided it while the data was in hand;
re-deriving it is what produced the dead probe described above.
The minimum cytome version is unchanged at 0.2.3. This release exists to
read older files correctly — the ones whose {modality}_counts may hold
normalized values — and requiring 0.3.0 would force an upgrade that helps none
of them. The dev extra does require 0.3.0, so the suite exercises the paths
only 0.3.0 produces instead of skipping them and reporting green.
Upgrading
If you have used run_cosg_cytome(layer='auto') on a cytome converted from a
normalised AnnData, re-run it — the previous result was computed on
doubly-normalised values. Runs on raw-count files are unaffected, and any run
that passed an explicit layer= was always correct.
pip install -U cosg