I am quite a newbie of spatial omics.
We tried running spatialdata
using Xenum 5K example data on a lab server(512Gb Mem, 120 thread CPU ,no GPU). The run time was much longer than expected, especially when plotting cropped spatial data.
Here are some examples:
%%time
from spatialdata import bounding_box_query
fig, ax = plt.subplots(1, 1, figsize=(10, 13))
crop0 = lambda x: bounding_box_query(
x,
min_coordinate=[20000, 8000],
max_coordinate=[20100, 8100],
axes=("x", "y"),
target_coordinate_system="global",
)
crop0(sdata).pl.render_labels("cell_labels").pl.show(
ax=ax, title="Cell labels", coordinate_systems="global")
output:
CPU times: user 1h 21min 50s, sys: 45min 40s, total: 2h 7min 30s
Wall time: 1h 1min 27s
However, the run time of plotting not-cropped spatialdata
seems acceptable:
%%time
sdata.pl.render_images("morphology_focus").pl.show(title="Morphology image")
output:
INFO Rasterizing image for faster rendering.
CPU times: user 2h 24min 28s, sys: 50min 15s, total: 3h 14min 43s
Wall time: 5min 20s
Is it because lacking of GPU?