Closed IdoBar closed 1 month ago
Just a quick update, when I specify heatmap=FALSE
, it generates a plot, but it is empty with no traces.
plot_gene(mbr, "EKO05_006932", heatmap = FALSE, spaghetti = TRUE)
Hmm that's not an error I've seen before, when you get an error, are you able to get any information from traceback()
. The only unusual thing I can see is using a very cutting edge version of ggplot2, but that really shouldn't cause this problem.
It seems that there are issues with patchwork
and recent versions of ggplot2
, I actually reverted back to v3.4.4 (based on this discussion) and updated pathcwork
, which solved some problem with patchwork
, but the plotting functions in NanoMethViz
still don't work.
This is my last_trace()
output:
Error in `combine_vars()`:
! Faceting variables must have at least one value
---
Backtrace:
▆
1. ├─base (local) `<fn>`(x)
2. └─patchwork:::print.patchwork(x)
3. └─patchwork:::build_patchwork(plot, plot$layout$guides %||% "auto")
4. └─base::lapply(x$plots, plot_table, guides = guides)
5. ├─patchwork (local) FUN(X[[i]], ...)
6. └─patchwork:::plot_table.ggplot(X[[i]], ...)
7. └─ggplot2::ggplotGrob(x)
8. ├─ggplot2::ggplot_gtable(ggplot_build(x))
9. │ └─ggplot2:::attach_plot_env(data$plot$plot_env)
10. │ └─base::options(ggplot2_plot_env = env)
11. ├─ggplot2::ggplot_build(x)
12. └─ggplot2:::ggplot_build.ggplot(x)
13. └─layout$setup(data, plot$data, plot$plot_env)
14. └─ggplot2 (local) setup(..., self = self)
15. └─self$facet$compute_layout(data, self$facet_params)
16. └─ggplot2 (local) compute_layout(..., self = self)
17. └─ggplot2::combine_vars(data, params$plot_env, vars, drop = params$drop)
Can you recommend versions of patchwork
and ggplot2
that you are using so I could try?
I have an update - after updating both ggplot2
and patchwork
and changing the sample names to not include dashes (following this thread on Bioconductor) I can get the plot if I turn off the heatmap.
plot_gene(mbr, "EKO05_006932", heatmap = FALSE, spaghetti = FALSE)
nmr <- load_example_nanomethresult()
plot_gene(nmr, "Peg3", heatmap = FALSE)
With heatmap=TRUE
I still get the error:
> plot_gene(nmr, "Peg3")
Error in self$get_transformation() : attempt to apply non-function
I am currently working with ggplot2_3.5.1 and patchwork_1.3.0.
I am currently working with ggplot2_3.5.1 and patchwork_1.3.0.
Thanks, it's working with these versions.
Hi, I'm very excited about this package, but I'm unable to generate methylation plots. I created an
mbr
object from BAM files generated bydorado
(usingsup,5mCG_5hmCG,6mA
models). The data seems to be loaded correctly and I can see the methylation probabilities:But when trying to plot them, I'm getting the following error message:
When trying to use the provided
nmr
example, I'm getting the following error:This is my session info:
Any help would be appreciated!
Thanks, Ido