`MOTIFBREAKR_plot`: `Error in grid.Call.graphics(C_unsetviewport, as.integer(n)) : cannot pop the top-level viewport ('grid' and 'graphics' output mixed?)` #15
library(BSgenome) ## <-- IMPORTANT!
library(BSgenome.Hsapiens.UCSC.hg19) ## <-- IMPORTANT!
#### Example fine-mapping results ####
merged_DT <- echodata::get_Nalls2019_merged()
#### Run motif analyses ####
mb_res <- MOTIFBREAKR(rsid_list = c("rs11175620"),
# limit the number of datasets tested
# for demonstration purposes only
pwmList_max = 5,
calculate_pvals = FALSE)
plot_paths <- MOTIFBREAKR_plot(mb_res = mb_res)
Console output
When run via CRAN checks.
dat is already a GRanges object.
Plotting 1 unique RSID(s).
Plotting motif disruption results: rs11175620
Error in grid.Call.graphics(C_unsetviewport, as.integer(n)) :
cannot pop the top-level viewport ('grid' and 'graphics' output mixed?)
Calls: MOTIFBREAKR_plot ... drawGD -> .local -> popViewport -> grid.Call.graphics
Execution halted
When run in R console:
genome_build set to hg19 by default.
Loading required namespace: SNPlocs.Hsapiens.dbSNP144.GRCh37
Using genome_build hg19
+ MOTIFBREAKR:: Converting SNP list into motifbreakR input format.
1. Bug description
Running
MOTIFBREAKR_plot
causes error in certain contexts. Documented here: https://github.com/Simon-Coetzee/motifBreakR/issues/31Expected behaviour
Function should run in all contexts.
2. Reproducible example
Code
Console output
When run via CRAN checks.
When run in R console:
3. Session info