Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chaotic Spatial #798

Open
DruncBread opened this issue Feb 10, 2025 · 2 comments
Open

Chaotic Spatial #798

DruncBread opened this issue Feb 10, 2025 · 2 comments

Comments

@DruncBread
Copy link

DruncBread commented Feb 10, 2025

Hi,

I tried moscot on two DLPFC slices 151673 and 151507 ( 151673 as reference).
But after running the codes below for alignment, I found that the resulted spatial is messed up.
Would you mind helping me solve this problem?
Thank you!

adata = ad.concat([target,source])

ap = AlignmentProblem(adata=adata)
ap = ap.prepare(batch_key="batch", policy="sequential")
ap = ap.solve()

mode='affine'
ap.align(reference='151673' , mode=mode, spatial_key="spatial", key_added=f"spatial_{mode}")
sq.pl.spatial_scatter(
    adata, shape=None, spatial_key=f"spatial_{mode}", library_id="batch", color="batch"
)

I visualized the slices and found that the domain is messed up.

Image

Image

@MUCDK
Copy link
Collaborator

MUCDK commented Feb 10, 2025

Hi,

Could you please clarify what you mean by "messed up"? What do you expect? How do you conclude that it's not what you want it to do?

Thanks!

@DruncBread
Copy link
Author

DruncBread commented Feb 11, 2025

Hi,

Sorry about the unclear description!

So I am attempting to align two DLPFC slices (151507 to 151673) using affine transformation. ( 151673 as reference, 151507 aligned to 151673 ).

Image

Image

However, after running the code above, the result was not as expected

As you can see in the code, I used affine transformation. So the aligned slices should have been simply rotated, but instead, the spots' domain (obs['ground_truth']) is incorrect, and it seems that the spots have been mixed up in the transformation.

Image

Image

I failed to upload the DLPFC dataset files on github. Would you mind leave your email so I could send you the data?

Thank you!

Best regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants