Repository navigation
Conversation
…fixed images being double scaled in create_stlearn.
This was referenced Oct 31, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
testing ~5,000,000 bins @ 20GB in ~20 minutes.
st.iopackage. Supporting:atera,xenium,visium_hdandvisium. Start ofspatial data native plotting with
st.pl.sdata_plotandst.pp.highly_variable_genes.(
cluster="6").load_lrsis deprecated forlr_pairswithconnectomeDB2020_putremoved. CCI and GO results change with thenew databases.
visium_hd_sgeandatera_sgeand return SpatialData objects.
st.io.attach_spatial.st.tl.cci.run.A spots x LR pairs with summaries, scores and p-values in
var.Downstream functions and plots now take
lr_results.microns_per_pixel,st.utils.microns_to_pixels,pixels_to_micronsandcreate_grid(bin_um=).where possible.
extract_featuresupports ConvNeXt and takesweights=.API and Bug Fixes:
st.tl.cci.run(use_label=...)never applied cell heterogeneity weighting:it read the cell-type data from the wrong key, found nothing, and weighted
every spot 1, so results were identical with and without
use_label. Itnow weights by heterogeneity from cell-type proportions in
uns[use_label]or per-cell labels in
obs[use_label], and takescell_prop_cutoff.CCI scores and significance change for any run that used
use_label.run_ccichanges: p-values calculated via permutation calculationvia are
(k+1)/(N+1)and can nolonger be 0, cutoff is nowp < p_cutoff, and permutations are seeded throughrandom_state.spot_mixturesmatches cell types by exact name.n_spotsin the LR summary counted spots with a score abovemin_expr,while the
min_spotsfilter counted spots with a score above 0, so thereported count was not the one the filter used. Both now use score > 0;
n_spotsgoes up for weakly scoring pairs.st.tl.cci.griddropped cells that fell on the last row or column of thegrid or exactly on a square boundary. Every cell now lands in exactly one
square, so cell counts, summed expression and label proportions change,
mostly in edge squares.
lr_plotalways drewlr_sig_scoreswhateveruse_labelasked for,so a plot labelled
p_adjsorneg_log10_p_adjsshowed the maskedscore instead. It now draws the statistic requested.
lr_plotandccinet_plotalso draw on afigoraxyou pass in rather thanopening a new figure, so they can go in subplots.
lr_plot/ccinet_plotuse thefig/axpassed in ratherthan creating their own.
uns["spatial"]are now uint8 (0-255), not floats in [0, 1].extract_featuretiles were fed as floats between 0-255 instead of 0-1.Tiles are now read as uint8, so
X_tile_featureandX_morphologychange.
concatenate_spatial_adata: the x and y offsets added toobsm["spatial"]for each tile were swapped, so spots landed on the wrong tile unless the tile
grid was symmetric. Tiles also keep their aspect ratio instead of being
stretched to
fixed_size, each sample is scaled by its own scale factorrather than the first sample's, and
fixed_sizeis (height, width) like aNumPy shape.
read_merfishworks again with new notebook.read_10xreads 16-bit / signed PNGs and reports missing images clearly.add.labels/add_loupe_clustersmatch by barcodeadd.positionsreads Space Ranger 2.0+ filesadd.parsingassigned spots the wrong coordinates (they were written in adifferent order from the spots in
obs), so every plot and anything usingobsm["spatial"](neighbours, SME, CCI) was wrong. Each spot now gets itsown position.
pseudotimeorients by median pseudotime (paths maydiffer),
shortest_path_spatial_pagareturns labels, plus fixes tolocal_level,weight_optimizing_local,de_transition_plotand thetrajectory plots.
qc_plotno longer makes a dense copy.stlearn.wrapperremoved.cci.gridvectorised and nolonger takesn_cpus.obsm["spatial"]is in full-resolution pixels (was image pixels), matchingthe rest of stLearn.
Xis sparse; no weight matrices inuns.extract_feature(cnn_base="xception"),deconvolution_plot(data_alpha=),local_plot(cluster=),Spatial(basis=).node_size=60(area);check_trajectory(size_spatial=7, img_key=None).