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

How to plot the aligned image on top of the tissue image? #40

Open
quiquevb23 opened this issue Sep 24, 2024 · 1 comment
Open

How to plot the aligned image on top of the tissue image? #40

quiquevb23 opened this issue Sep 24, 2024 · 1 comment

Comments

@quiquevb23
Copy link

After I run a pairwise alignment on 2 or more slices and then run pst.stack_slices_pairwise, a new adata object is generated with the aligned coordinate matrix, but this adata object does not contain the aligned "hires" and "lowres" images, as far as I know.

Does PASTE deals with this somehow or should I supply as img_key a tissue image of one of the slices that were aligned? If this is the case, should I edit it with the output of pst.stack_slices_pairwise (such as angles and rotation?)

This is the function I want to run and the error I get
sc.pl.spatial(adata,
img_key="hires",
color=["domain"],
show=False)

ValueError: When .uns['spatial'][library_id] does not exist, spot_size must be provided directly.

@mrland99
Copy link
Member

Hi,

Sorry for the late response-- I don't believe PASTE is built to manipulate images in the way you mentioned.

However, since PASTE returns the rotation and translations for each slice, perhaps a workaround would be to do the rotation and translation of the images yourself?

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