zhoux85 / STAligner

STAligner is a tool for alignment and integration of spatially resolved transcriptomics data.
MIT License
29 stars 5 forks source link

error import mnn_utils #12

Closed mkunst23 closed 11 months ago

mkunst23 commented 11 months ago

Hi,

I'm trying to run Tutorial 5: Spatial domain guided 3D slices alignment

When I run this code:

iter_comb = [(0,6), (1,6), (2,6), (3,6), (4,6), (5,6)] landmark_domain = ['3'] import mnn_utils for comb in iter_comb: print(comb) i, j = comb[0], comb[1] adata_target = Batch_list[i] adata_ref = Batch_list[j] slice_target = section_ids[i] slice_ref = section_ids[j]

aligned_coor = ST_utils.ICP_align(adata_concat, adata_target, adata_ref, slice_target, slice_ref, landmark_domain)
adata_target.obsm["spatial"] = aligned_coor

It can't seem to find the module mnn_utils


ModuleNotFoundError Traceback (most recent call last) Cell In[1], line 3 1 iter_comb = [(0,6), (1,6), (2,6), (3,6), (4,6), (5,6)] 2 landmark_domain = ['3'] ----> 3 import mnn_utils 4 for comb in iter_comb: 5 print(comb)

ModuleNotFoundError: No module named 'mnn_utils'

I did a quick search for the module but could not find a source from which to install it from

zhoux85 commented 11 months ago

Hi. Sorry for the bug. import mnn_utils is a redundant line in the tutorial 5, and I removed it right now.

Also, aligned_coor = ST_utils.ICP_align(adata_concat, adata_target, adata_ref, slice_target, slice_ref, landmark_domain) should be replaced by aligned_coor = STAligner.ICP_align(adata_concat, adata_target, adata_ref, slice_target, slice_ref, landmark_domain)

mkunst23 commented 11 months ago

Great, that worked.

Thanks