Changelog¶
Changes that users of kdomainbench notice, newest first. The format follows Keep a Changelog.
0.1.0 (2026-11-30)¶
First release on PyPI: ten methods behind kdb.run, kdb.run_all and kdomainbench run, scoring
with kdb.evaluate, kdb.load_results and kdb.k_accuracy, the twelve metrics of the paper in
kdb.metrics, and the plots in kdb.pl.
The entries below are the changes since the GitHub version of 2 November 2026.
Added¶
kdb.metricsandkdomainbench metrics: the twelve metrics of the paper, computed by the paper's ownmetrics.Randscs.py.kdomainbench check --metricstests them, andkdomainbench install metricsinstalls their R packages.- A run folder records the package version and the settings that change a method
(
run_info.jsonfieldskdomainbenchandenv), and the packages of the method's environment (packages.txt). kdb.run_allends with one warning that names every method that did not finish.load_results(h5ad=)andkdomainbench summarize --h5adscore runs made on another machine. On the command line each file scores the runs of the dataset of its name, and--h5adcan be repeated.summarize --reference-keyscores against anotherobscolumn.kdb.pl.plot_metrics: the metrics of every run as a matrix of bars, laid out as Fig. 2f of the paper.kdomainbench install: creates the conda environments and installs the R packages from files that now come with the package (src/kdomainbench/envs/).KDB_ENVS_DIRandKDB_R_LIBsay where.kdb.example_data()downloads the example file.kdomainbench --version.run_info.jsonrecordsOMP_NUM_THREADS, and Run on a cluster says how to keep CellCharter, DeepST and SpaGCN to the cores of a job.kdb.evaluate,kdb.reference_annotationand the plots accept an AnnData object for the input file and a run folder for the labels.kdb.evaluatealso compares two runs.kdomainbench checklooks for every R package the method scripts load and reads an.h5adfile from R.check --gpufails when no GPU is visible.- Pages: the how-to guides Your own data, Run on a cluster and Troubleshooting, the Command line reference, FAQ, Citation, Contributing and Changelog.
CONTRIBUTING.md, and a GitHub Actions workflow that runs the tests and builds the site.kdb.evaluateandkdb.load_resultswarn when labels of a run belong to no spot of the input file, andkdb.load_resultswarns when successful runs could not be scored. A file without an annotation gives no warning.- A run's
cluster_results.csvread withpd.read_csvis accepted as the labels of a run. Barcodes that look like numbers needdtype=strthere. - A run folder made by hand needs only
method,dataset,h5adand"success": truein itsrun_info.jsonto be listed and scored. kdb.evaluate(clusters, h5ad, reference_key=...)scores against anotherobscolumn.- The messages about a missing environment give the address of the installation page.
Changed¶
- Breaking:
kdb.runtakesout_rootinstead ofout_dir, with the folder layout ofkdb.run_allandkdomainbench run -o:<out_root>/<method>/<dataset>_<device>. - Breaking, to the terms of the paper:
ground_truthis nowreference_annotation(itskeyisreference_key),k_trueisk_reference,truth_keyisreference_key,evaluate(truth=)isevaluate(reference=), and then_spotsofevaluateisn_spots_scored.plot_k_estimates(k_true=)isplot_k_estimates(k_reference=). kdb.pl.plot_k_estimateshas one row per method and colors each dot by its distance from the reference k, as Fig. 2b of the paper. Runs of several datasets are drawn as k errors. Breaking:k_referencetakes one number, not a list.gpu_iddefaults to the GPUs a scheduler names inCUDA_VISIBLE_DEVICES, else GPU 0.kmaxis checked before any method starts: at least 2 for every method, also for DeepST and SpaGCN, which do not use it, and at most 30 for BNPSpace.- A run that is stopped or fails stays on record with
"success": false, and labels or metrics of an earlier run in the same folder are deleted first. load_resultsraisesFileNotFoundErrorfor a folder that does not exist and always returns the score columns. It raisesValueErrorwhen oneh5adfile is given for runs of several datasets.kdb.runandkdb.run_allstop before any method starts when the input is a folder or not an.h5adfile.kdomainbench summarizeprints the main columns, and each reason a run was not scored once.--csvkeeps every column. Warnings print without Python's source line.kdomainbench run,metricsandsummarizeexit with an error code when a method did not finish, a metric could not be computed or no run succeeded.- A fatal error of
kdomainbenchis one line that starts withkdomainbench: error:, and a method named twice runs once. kdb.read_clusters,kdb.load_results(h5ad=),kdb.k_accuracyand the plots say what is wrong with their input: a run that did not finish, an input file that does not exist, a table without the columns ofload_results.kdb.pl.plot_spatial_gridtitles each map<method> (k = n).drsc.Rno longer readsobs["clusters"], so it runs on files without an annotation.- Breaking:
envs/install_r_packages.R,envs/kdb_py.ymlandenvs/kdb_spatialde.ymlmoved tosrc/kdomainbench/envs/. Usekdomainbench install rin place ofRscript envs/install_r_packages.R. KDB_ENVS_DIRis also read when a method starts: the environments are looked for in that folder first.- An interpreter or an R library named by a relative path (
KDB_PY_PYTHON,KDB_R_LIB,kdb.set_env) is counted from the folder you work in, not from the run folder. load_results(h5ad=)checks the files it is given before it reads any run: a folder or a file that is not.h5adraises at once. Messages about an input file give its full path.- The dependencies have lower bounds: numpy 1.23, pandas 1.5, matplotlib 3.6, scikit-learn 1.2, anndata 0.9. The tests pass on these versions with Python 3.10.
- The license is stated as GPL-3.0-only AND MIT in the package metadata. MIT is the license of
the BNPSpace code in
methods/bnpspace_R/. envs/install_envs.shandkdomainbench installkeep the packages of~/.localandPYTHONPATHout of sight while the environments are created.- The R package installer stops at once when R is older than the packages need, installs the CRAN and Bioconductor packages in one pass, and builds up to four packages at a time.
- iSC.MEB is no longer on CRAN. The installer takes its release 1.0 from its authors' GitHub repository, at a fixed commit. SC.MEB 1.1 is built as C++14, which the current RcppArmadillo needs.
- An AnnData object where only a file will do (
kdb.run,kdb.run_all,load_results(h5ad=)) raises aTypeErrorthat says to save it first. kdb.run_allprints the last lines of a failed method's log once, not twice.dir(kdb)lists the public names only.- Python 3.10 or later.
Removed¶
- The
docsextra ofpyproject.toml. Usedocs/requirements.txt. - cowplot from
envs/install_r_packages.R: no method script loads it.