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

Potential Visual Artifact When Adjusting mols.size in ImageDimPlot #9496

Open
sallyseullee-0821 opened this issue Nov 19, 2024 · 0 comments
Open

Comments

@sallyseullee-0821
Copy link

Hello Seurat Team,

While generating image plots using the ImageDimPlot function, I noticed an unexpected behavior when adjusting the mols.size parameter, which controls the size of the red dots representing molecules.

When comparing two figures:
1. First one generated with mols.size = 0.5
2. Second one generated with mols.size = 1
The red dots became smaller as expected. However, upon closer inspection, I observed some points that seemed to have changed positions, or disappeared, or newly appeared.

HPAP-092 52 INS_molsize0 5
HPAP-092 52 INS_molsize1

This discrepancy is puzzling, as the molecule positions should remain consistent regardless of dot size. I suspect this might be a visual artifact caused by altering the mols.size parameter. It seems possible that changing the size modifies the layer visibility within the image, potentially causing some areas to be covered or newly revealed.

Here is the code I used to generate the plots:

ImageDimPlot(
  object = IF.sub,
  fov = "zoom1",
  cols = col,
  alpha = 0.3,
  molecules = i,
  crop = TRUE,
  axes = TRUE,
  dark.background = FALSE,
  mols.cols = "red",
  **mols.size = 0.5**,  # Adjusted parameter
  nmols = 20000,
  border.color = NA,
  coord.fixed = TRUE,
  size = 1,
  mols.alpha = 1
) + 
  theme_bw()

The only difference between the two plots was the mols.size parameter.

Is this behavior expected, or does it indicate a potential issue with how ImageDimPlot renders molecule dots at different sizes?
If this is a known limitation, are there recommendations to ensure consistent visualization while adjusting dot sizes?

I appreciate any guidance or clarification regarding this matter. Thank you for your time and assistance!

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

1 participant