ggtranscript icon indicating copy to clipboard operation
ggtranscript copied to clipboard

Warning about size being replaced by linewidth in ggplot2 3.4.0+

Open Ni-Ar opened this issue 1 year ago • 0 comments

Hi, this is not an issue, just a report about a change in ggplot2 affecting your package. Best, Nicco

# devtools::install_github("dzhang32/ggtranscript")
library(dplyr)
library(ggplot2)
library(ggtranscript)

Running the first example

# extract exons
sod1_exons <- sod1_annotation |> filter(type == "exon")

sod1_exons |>
  ggplot(aes( xstart = start, xend = end, y = transcript_name ) ) +
    geom_range( aes(fill = transcript_biotype) ) +
    geom_intron( data = to_intron(sod1_exons, "transcript_name"),
                 aes(strand = strand) )

Prints this warning from ggplot2

Warning message:
Using the `size` aesthetic in this geom was deprecated in ggplot2 3.4.0.
ℹ Please use `linewidth` in the `default_aes` field and elsewhere instead.
This warning is displayed once every 8 hours.
Call `lifecycle::last_lifecycle_warnings()` to see where this warning was generated. 

Session info:

 packageVersion('ggplot2')
[1] ‘3.4.1’
packageVersion('ggtranscript')
[1] ‘0.99.9’
R.version.string
[1] "R version 4.1.2 (2021-11-01)"

Ni-Ar avatar Apr 03 '23 12:04 Ni-Ar