mahmoodlab / HEST

HEST: Bringing Spatial Transcriptomics and Histopathology together - NeurIPS 2024
Other
160 stars 12 forks source link

negative value in adata.obsm['spatial'] #40

Closed xiachenrui closed 2 months ago

xiachenrui commented 2 months ago

Hi,

Thanks for your great works !

I found in TENX92 sample's data (read as AnnData format by scanpy), some spots have negative value.

import scanpy as sc
adata = sc.read_h5ad('./hest/st/TENX92.h5ad')
adata.obsm['spatial'].min()
# I got "-139"

Does this phenomenon mean the spot is not inside the H&E image ? Any clarification will be helpful !

Best,

Chen-Rui

pauldoucet commented 2 months ago

Hi @xiachenrui, Correct some of the spots in TENX92 are outside the image, this can be visualized on spatial_plots/TENX92_spatial_plots.

These spots are filtered out during patching (in patches/ or using dump_patches())

TENX92_spatial_plots

xiachenrui commented 2 months ago

Thanks for your quick response !