Migration guide to sopa>=2.0.0
#138
quentinblampey
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We decompose the migration guide into three migration guides (Snakemake / API / CLI). Most changes concern the API.
New requirements
We dropped support for python==3.9, but we now support python 3.10 to 3.12 (included).
In any case, we recommend creating a new fresh environment to install the new version of Sopa.
👨💻 API
Refer to the new API tutorial to see the new recommended usage of the API. The main features/changes are described below.
API new features
sopa.settings.parallelization_backend = 'dask'
. More details in the FAQ.sopa.segmentation.cellpose(sdata, ...)
orsopa.segmentation.baysor(sdata, ...)
. This will implicitly use the selected parallelization backend. See the documentation here.sdata.attrs
so that Sopa knows automatically which element should be used in which function. It is still possible to preciseimage_key
/points_key
/shapes_key
if needed. More details in the FAQ.sopa.settings.auto_save_on_disk = False
. See here.force
a segmentation, for Baysor). See here.sopa.segmentation.tissue
)aggregate_bins
function.sopa.segmentation.stardist
API migration guide
sopa.segmentation.Patches2D
is deprecated. Instead, use the functionssopa.make_image_patches
orsopa.make_transcript_patches
. See here.sopa.segmentation.tissue
are now more explicit (e.g.,blur_kernel_size
instead ofblur_k
).sdata["image_patches"]
instead ofsdata["sopa_patches"]
sopa.overlay_segmentation
instead ofsopa.segmentation.overlay_segmentation
Aggregator
class has been replaced by a simple function wrapper:sopa.aggregate
sopa.utils.higher_z_score
instead ofsopa.annotation.higher_z_score
🐍 Snakemake pipeline
Refer to the new Snakemake usage tutorial to see the new recommended usage of Snakemake. The main features/changes are described below.
Snakemake pipeline new features
tissue
section inside thesegmentation
section. Inside it, usemode: "saturation"
for H&E based tissue segmentation, ormode: "staining"
for staining based tissue segmentation.Snakemake pipeline migration guide
snakemake>=8.0.0
, as detailed in the getting started, and having it in a separate environment (asnakemake
env separated from thesopa
environment).snakemake>=8.0.0
. Refer to our new Snakemake tutorial to see what changed and how to use it. In particular, you'll need a Slurm plugin:pip install snakemake-executor-plugin-slurm
. Also, the logs are now located insopa/workflow/.snakemake/slurm_logs/rule_<name>/<job-id>.log
.baysor
alias, or having the executable at~/.julia/bin/baysor
, instead of setting the executable path in the config underconfig['executables']['baysor']
.⚙️ CLI
Refer to the new CLI usage tutorial to see the new recommended usage of the CLI. The main features/changes are described below.
CLI new features
export SOPA_PARALLELIZATION_BACKEND=dask
.--patch-index
, it will run automatically on all patches with the selected parallelization backend, making the CLI usage much more simple.sopa segmentation tissue
has been added.sopa segmentation baysor
has been added (simplifying the usage of Baysor).CLI migration guide
sopa read
has been renamedsopa convert
to avoid confusion.--cache-dir-name
instead of--patch-dir
Beta Was this translation helpful? Give feedback.
All reactions