spacr.umap_annotations¶
Transactional database writes for interactive Image UMAP selections.
Functions¶
|
Write one integer value per UMAP record into |
Module Contents¶
- spacr.umap_annotations.write_umap_annotations(records: Sequence[Mapping], values: Iterable[int], column: str) Tuple[int, int][source]¶
Write one integer value per UMAP record into
png_list.- Parameters:
records – rows carrying
db_pathand originaldb_png_path.values – integer annotations aligned one-to-one with
records.column – annotation column to add or update in
png_list.
Records are grouped by database so a multi-plate embedding commits once per file. The original
png_pathvalue from the database is the update key; corrected/display paths are deliberately not used.- Returns:
(rows_updated, records_skipped).- Raises:
ValueError – when records and values differ in length or
columnis not a valid SQLite identifier.