Sopa

Latest version: v2.0.3

Safety actively analyzes 722491 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 5

2.0.4

2.0.3

Added
- Experimental support of [proseg](https://github.com/dcjones/proseg) lguerard (#223) - tutorial coming soon
- Use symlink to Xenium output morphology/transcripts files to avoid duplicating data (221)
- Run `module load baysor` in Snakemake pipeline if the module is available.

Fixed
- Use `sdata.path.resolve()` to compute the cache dir (more robust to execution path change)

Changed
- Using `density_prior = "uniform"` by default for Tangram (174)
- [`spatialdata_plot`](https://spatialdata.scverse.org/projects/plot/en/latest/index.html) is now a default dependency of Sopa
- Use `prob_thresh=0.2` and `nms_thresh=0.6` by default in `stardist`
- During segmentation, pixels outside of the ROI / tissue use the mean channels value instead of 0 (222)

2.0.2

Added
- Added H-optimus-0 model for H&E patches embeddings stergioc (208)
- Can provide `qv_threshold` argument to the Xenium reader to filter low quality transcripts callum-jpg (210)

Changed
- Storing patches embeddings as an `AnnData` object instead of images (212) (see [updated tuto](https://gustaveroussy.github.io/sopa/tutorials/he/))

Fixed
- Right sorting scales for WSI reader with openslide backend stergioc (209)
- When a polygon cannot be simplified (for the Xenium Explorer), convert it to a circle (206)
- `sopa explorer write`: use correct default argument for `table_key` in the CLI (211)
- Fix Baysor usage on Windows (185)
- Fix tight patches returning a different number of patches (214)

2.0.1

Fixed
- Safer check dataframe series is of integer dtype (179)
- Ensure `feature_key` is converted correctly to a string (185)
- Fixed the WSI readers stergioc (192)
- Fixed `points_key` usage in `sopa.aggregate` (194)

Added
- Aggregation and segmentation now exclude non-interesting gene names (e.g., "blank", "unassigned", ...) (144)
- Can filter low-quality transcript for transcript-based segmentation (79)
- Possibility to choose the table name for the report (183)
- Possibility to choose the table name for `sopa.io.explorer.write` (183)
- Can set all `spatialdata_io.xenium` arguments in `sopa.io.xenium`
- CLI for stardist jeffquinn-msk (189)
- Baysor logs if running on one patch, and return the right error code in CLI jeffquinn-msk (199)
- Baysor parallelization per patch Marius1311 (203)

Changed
- `sopa.io.write_report` is copying the adata to avoid modifying it (196)

2.0.0

This version introduces many new API features but also some breaking changes; check [our migration guide](https://github.com/gustaveroussy/sopa/discussions/138) to smoothly update your code base.

Added
- Full Visium HD support (including, notably, bins aggregation)
- Dask parallelization backend for faster segmentation (useful for API users). This can be done via `sopa.settings.parallelization_backend = 'dask'`. More details in the FAQ.
- Support for one-line segmentation, e.g. `sopa.segmentation.cellpose(sdata, ...)` or `sopa.segmentation.baysor(sdata, ...)`. This will implicitly use the selected parallelization backend.
- Spatial elements keys are saved in `sdata.attrs` so that Sopa knows automatically which element should be used in which function. It is still possible to precise `image_key` / `points_key` / `shapes_key` if needed. More details in the FAQ.
- Allows changing the auto-save settings (i.e. decide if spatial elements are saved on-disk automatically or not). This can be done via `sopa.settings.auto_save_on_disk = False`.
- Can recover a failed/stopped segmentation when using the API (and also `force` a segmentation, for Baysor)
- Better cache handling (invisible to API users)
- New tissue segmentation for non-H&E data (`sopa.segmentation.tissue`)
- Full support for `baysor>=0.7.0`
- Added `Stardist` segmentation (mainly used for H&E data)
- Added support for Python 3.12

Changes
- The `sopa.io.uniform` dataset is now deprecated (use `sopa.io.toy_dataset` instead)
- API: The image patches are now called `sdata["image_patches"]` instead of `sdata["sopa_patches"]`

Breaking changes
- Drop support for Python 3.9
- API: `sopa.segmentation.Patches2D` is deprecated. Instead, use the functions `sopa.make_image_patches` or `sopa.make_transcript_patches`
- API: Use `sopa.overlay_segmentation` instead of `sopa.segmentation.overlay_segmentation`
- API: The `Aggregator` class has been replaced by a simple function wrapper: `sopa.aggregate`
- API: The annotations methods are moved to the utils. For instance, use `sopa.utils.higher_z_score` instead of `sopa.annotation.higher_z_score`
- CLI: `sopa read` has been renamed `sopa convert` to avoid confusion.
- CLI: during segmentation, use `--cache-dir-name` instead of `--patch-dir`
- Drop support for Python 3.9

Fixes
- Snakemake path issue on Windows (64)
- Issues related to incompatible versions of Baysor

1.1.6

Fix
- Support `baysor>=0.7.0` (125, lguerard).
- NB: For Snakemake, please remove the `new_component_*` arguments from the Baysor config.
- Use `DataTree` from `xarray` - use new spatialdata version (159)

Page 1 of 5

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.