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

PlotSurface smoothing works for individual genes, but not gene sets #89

Open
wlwang20 opened this issue Sep 25, 2023 · 5 comments
Open

Comments

@wlwang20
Copy link

Hi All,

I am hoping to plot some gene sets using PlotSurface and use the smooth_span parameter to smooth the expression levels of the gene sets. However, it does not seem like the smoothing parameter is working in this use case. I have tried using individual genes (the smoothing works there), and plotSurfaceInteractive (which smoothes the expression correctly), but plotSurface does not seem to able to smooth the expression of gene sets. Please let me know if there is something I am omitting for gene_sets.

object_t275 <- downloadSpataObject("275_T", file = NULL)
plotSurface(object_t275, 
              color_by = "HM_HYPOXIA",
              display_image = FALSE,
              smooth = TRUE,
              smooth_span = 1.0)

image

Plotting individual genes and smoothing does seem to work...

plotSurface(object_t275, 
              color_by = "VEGFA",
              display_image = FALSE,
              smooth = TRUE,
              smooth_span = 1.0)

image

@kueckelj
Copy link
Collaborator

kueckelj commented Oct 3, 2023

Hello wlwang20, thanks for mentioning this bug. I have fixed the code. Can you install the master branch again and see if it works now for you?

Best regards

Jan

@wlwang20
Copy link
Author

wlwang20 commented Oct 4, 2023

Yes thank you. It is working now. As a follow-up, I do notice that the 'gsea' method for plotting gene sets doesn't seem to recapitulate expected outputs. For example, in sample #UFK275_T, the Hypoxia region plotted with the code below doesn't match that which was published.

plotSurface(object_t275, 
             color_by = "HM_HYPOXIA",
             method_gs = 'ssgsea',
             display_image = FALSE,
             smooth = TRUE,
             smooth_span = 4.0)
Screenshot 2023-10-03 at 5 53 16 PM

@wlwang20
Copy link
Author

wlwang20 commented Mar 7, 2024

Wanted to follow up to see if the implementation of the ssgsea has been fixed? Thanks!

@WeimengYuu
Copy link

hello Jan,
If i add methods_gs in the code:

plotSurface(object, color_by = "HM_HYPOXIA", display_image = T, smooth = TRUE, smooth_span = 1.0,methods_gs="ssgsea")

There will some errors: I would like to know how to apply the ssgsea method:
Error in continuous_scale(aesthetics, name = name, palette = pal_gradient_n(pal_viridis(alpha, :
unused argument (methods_gs = "ssgsea")

@kueckelj
Copy link
Collaborator

Hello all, sorry for the late reply. Do the problems persist in SPATA2 v3.0.0?

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

3 participants