Question: ggbio Error: Don't know how to add o to a plot
0
gravatar for zhe
13 months ago by
zhe0
zhe0 wrote:

I encountered a new error about the geom_arrow function in ggbio package that shows up after the recent update of ggplot2 package. Here is a reproducible example from the example code of geom_arrow function:

 

set.seed(1)
N <- 100
require(GenomicRanges)
## ======================================================================
##  simmulated GRanges
## ======================================================================
gr <- GRanges(seqnames = 
              sample(c("chr1", "chr2", "chr3"),
                     size = N, replace = TRUE),
              IRanges(
                      start = sample(1:300, size = N, replace = TRUE),
                      width = sample(70:75, size = N,replace = TRUE)),
              strand = sample(c("+", "-", "*"), size = N, 
                replace = TRUE),
              value = rnorm(N, 10, 3), score = rnorm(N, 100, 30),
              sample = sample(c("Normal", "Tumor"), 
                size = N, replace = TRUE),
              pair = sample(letters, size = N, 
                replace = TRUE))


## ======================================================================
##  default
## ======================================================================
ggplot(gr) + geom_arrow()
# or
ggplot() + geom_arrow(gr)

 

Error: Don't know how to add o to a plot

I think this has something to do with the new ggplot2 release because this code works fine a few weeks ago. I tried running this in R/3.5.0 and R/3.5.1 and both failed.

Does anyone know how to resolve this error?

 

Thanks

ggbio software error ggplot2 • 620 views
ADD COMMENTlink modified 13 months ago • written 13 months ago by zhe0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 197 users visited in the last hour