Changelog#
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.1.6 - 2026-06-29#
Fixed#
Zero-shot in-silico perturbation (
perturb_dataset) no longer hangs and runs substantially faster, especially on larger datasets and many-core machines.
Changed#
perturb_datasetnow maps in a single process by default (nproc=1).
0.1.5 - 2026-06-28#
Added#
terra.__version__exposes the installed package version.
Changed#
perturb_datasetmatches a specificperturbed_cell_idon each cell’s owncell_id, so perturbing specific cells with acelltarget no longer needsadd_neigh_cell_ids. Onlyneighborhood-target perturbations on specific cells require it (to know each cell’s neighbors).
Fixed#
perturb_datasetno longer stalls on datasets that carry a neighborhoodcell_idscolumn. The perturbation map no longer adds per-row flag columns (changing the output schema forceddatasetsto re-encode every column, including the large nestedcell_ids);return_only_perturbed_cellsnow selects the affected cells computed directly from the perturbation table.get_spatial_scorenow honors itscompute_cosine_with_listargument (it was previously overwritten and ignored).
Documentation#
Expanded the tutorials (single- and multi-sample zero-shot quickstarts and a downstream-analysis walkthrough covering gene programs, spatial gene-pair scoring, EMD spatial structure, and in-silico perturbation) and user guide, and fixed numerous API-reference rendering issues.
0.1.4 - 2026-06-27#
Fixed#
Perturbing specific cells by ID now works on multi-sample data: the pipeline forwards
add_neigh_cell_idsthrough its multi-sample branch, and the neighborhoodcell_idscolumn is kept out of the torch format so it survives tokenization.
0.1.3 - 2026-06-27#
Fixed#
perturb_datasetno longer hangs on torch-formatted datasets. It now maps over the unformatted dataset (formatting the large nested token columns insidemapcould stall indefinitely) and restores the format afterwards.
Changed#
perturb_dataset(..., return_only_perturbed_cells=True)now subsets the perturbed cells with an index-basedselectinstead of a full-tablefilter, avoiding a costly scan and rewrite of every tokenized row.
0.1.2 - 2026-06-27#
Fixed#
read_xenium_10xnow aligns cell centroids correctly for older Xenium panels with an integercell_id, which previously produced all-NaN spatial coordinates.get_spatial_scoreandget_emd_distanceno longer raiseNameError: gene_embed_dataset— the helper they depend on is now imported.perturb_datasetwithperturbed_cell_id="all"now applies"all"-gene knockout/fold-change perturbations correctly (the all-cells fast path referenced an unbound variable for whole-panel perturbations).
0.1.1 - 2026-06-26#
Added#
Optional
local_dirargument todownload_pretrainedto download a model bundle into a chosen folder instead of the Hugging Face cache.
Fixed#
Single-sample zero-shot inference (
harmonize_tokenize_embed_pipelinewithsample_key=None) no longer fails withKeyError: 'batch'; the whole AnnData is now treated as one batch and any existing batch column is kept.
0.1.0 - 2026-06-26#
First public release of TERRA, a JEPA-based foundation model for spatial transcriptomics, pretrained on HST-Corpus-112M (>100 million cells at single-cell resolution).
Added#
Pretrained models (
TERRA-96M,TERRA-112M) distributed as self-contained bundles on the Hugging Face Hub, with download and publishing utilities (download_pretrained,terra-hub).Zero-shot inference pipeline producing cell- and neighborhood-level embeddings for single- and multi-sample spatial data.
Downstream analyses: gene-level embeddings, spatial gene-pair scoring, EMD-based spatial structure, and in-silico perturbation.
Finetuning of the pretrained encoder with LoRA/PEFT.
Documentation, tutorials, and API reference.