Closed YingziZhang-github closed 1 year ago
Are there any warnings or errors that pop up? What does it look like if you set spaghetti = FALSE
?
Yes, there are warnings as the following:
Warning messages:
1: Computation failed in `stat_lowess()`
Caused by error in `as.data.frame.default()`:
! cannot coerce class ‘"lowess"’ to a data.frame
2: Removed 3 rows containing missing values (`geom_segment()`).
3: Removed 3 rows containing missing values (`geom_segment()`).
When I set spaghetti = FALSE
, the warnings are as the same. The output figure turned out empty:
That is very surprising, I really don't have any idea why it would happen. Does this happen for any other regions you try to plot?
Hi Shian,
I tried three regions in different chromosomes. It happened the same way.
The warning message is
Computation failed in `stat_lowess()`
Caused by error in `as.data.frame.default()`:
! cannot coerce class '"lowess"' to a data.frame
The other NanoMethViz functions all run very well with my data, only the spaghetti plots behave weirdly as mentioned above. I may try to find other alternatives to make the line plot. Many thanks for the help.
Yingzi
If possible I would appreciate example data to reproduce this bug. If you could use query_methy()
to extract an unimportant region where this bug occurs I could use that data to try and debug this issue.
example data to reproduce this bug
Hi Shian,
Thank you very much. I sent the example data to the email box su.s@wehi.edu.au.
Best, Yingzi
I'm unable to reproduce the bug, but maybe I am using different settings to you. I suggest using the heatmap = TRUE
argument which might provide further insight into what's going on.
nmr <- NanoMethResult(
methy = "experimental/smooth_bug.tsv.bgz",
samples = samples
)
plot_region(nmr, "chr15", 24952550, 24953450, heatmap = TRUE, spaghetti = TRUE)
Hi Shian,
When I used
plot_region(nmeth_results, "chr*", $1, $2, spaghetti = TRUE)
, the output figure was missing the main spaghetti line of each group, as this:It was different than the example spaghetti figure:
Would you suggest if I made anything wrong? Or did I miss to set any options?
Thank you! Looking forward to your reply!
Yingzi