[Bioc-devel] ggplot2 update coming on June 25 and how it affects ggbio + other packages

Michael Lawrence l@wrence@mich@el @ending from gene@com
Wed Jun 6 22:16:24 CEST 2018


Hi Leonardo,

I'm aware that the new ggplot2 is breaking ggbio. I haven't yet
convinced myself to actually fix it, even though I know there's no way
to avoid it. ggbio represents a big piece of technical debt, and I'm
not sure how to pay it off.

Michael

On Wed, Jun 6, 2018 at 1:03 PM, Leonardo Collado Torres
<lcollado using jhu.edu> wrote:
> Hi,
>
> Two of my Bioconductor packages (regionReport and derfinderPlot) use
> ggplot2 via ggbio. Since other packages import/suggest ggbio
> http://bioconductor.org/packages/release/bioc/html/ggbio.html I'm
> curious if you've taken a look at the email from Hadley Wickham and
> the upcoming update to ggplot2 on June 25.
>
> That email includes:
>
> 1. Read about the changes to ggplot2 at
>    https://github.com/tidyverse/ggplot2/blob/master/NEWS.md#ggplot2-2219000.
>    This page includes a list of breaking changes, the reasoning behind
>    them, and to how to update your code.
>
>
> 2. Carefully inspect the failing checks listed at the bottom of this email.
>
>
> I'm not sure if some of these issues are actually from ggbio or maybe
> from my own code. If you think that they are on my end, please let me
> know (like if you know that ggbio runs well with the new ggplot2).
>
> Since it might be helpful for ggbio maintainers, I'm including my
> check results from Hadley at the end of this email.
>
> Best,
> Leo
>
>
> ## regionReport https://github.com/leekgroup/regionReport
>
> == CHECK RESULTS ========================================
>
> *   checking examples ... ERROR
>     ```
>     ...
>     label: MAstyle (with options)
>     List of 2
>      $ fig.width : num 10
>      $ fig.height: num 10
>
>        inline R code fragments
>
>     label: genomeOverview1 (with options)
>     List of 6
>      $ message   : logi FALSE
>      $ fig.width : num 7
>      $ fig.height: num 9
>      $ dpi       : num 300
>      $ eval      : symbol nullExist
>      $ echo      : symbol nullExist
>
>     Scale for 'x' is already present. Adding another scale for 'x', which will
>     replace the existing scale.
>     Quitting from lines 365-366 (basicExploration.Rmd)
>     Error: subscript contains invalid names
>     Execution halted
>     ```
>
> *   checking re-building of vignette outputs ... WARNING
>     ```
>     ...
>       ...
>     [WARNING] This document format requires a nonempty <title> element.
>       Please specify either 'title' or 'pagetitle' in the metadata.
>       Falling back to 'bumphunterExampleOutput.utf8'
>     [WARNING] This document format requires a nonempty <title> element.
>       Please specify either 'title' or 'pagetitle' in the metadata.
>       Falling back to 'bumphunterExampleOutput.utf8'
>     Warning in citation("BiocStyle") :
>       no date field in DESCRIPTION file of package 'BiocStyle'
>     Warning in citation("biovizBase") :
>       no date field in DESCRIPTION file of package 'biovizBase'
>     Warning in citation("TxDb.Hsapiens.UCSC.hg19.knownGene") :
>       no date field in DESCRIPTION file of package
> 'TxDb.Hsapiens.UCSC.hg19.knownGene'
>     Warning in citation("DEFormats") :
>       no date field in DESCRIPTION file of package 'DEFormats'
>     Writing 34 Bibtex entries ... OK
>     Results written to file 'regionReportRef.bib'
>     Quitting from lines 230-235 (basicExploration.Rmd)
>     Error: processing vignette 'regionReport.Rmd' failed with diagnostics:
>     subscript contains invalid names
>     Execution halted
>     ```
>
> ## Notes by Leo: derfinderPlot::plotOverview() seems to be the culprit
> here https://github.com/leekgroup/derfinderPlot/blob/master/R/plotOverview.R.
> That function ends up using autoplot() and layout_karyogram() from
> ggbio. Or maybe the issue is on my end with the use of
> scale_colour_manual() and scale_fill_manual().
>
>
>
>
>
> ## derfinderPlot https://github.com/leekgroup/derfinderPlot
>
>
> == CHECK RESULTS ========================================
>
> *   checking examples ... ERROR
>     ```
>     ...
>
>     > genes <- annotateTranscripts(txdb = TxDb.Hsapiens.UCSC.hg19.knownGene,
>     +     annotationPackage = 'org.Hs.eg.db')
>     Getting TSS and TSE.
>     Getting CSS and CSE.
>     Getting exons.
>     Annotating genes.
>     > annotation <- matchGenes(x = genomeRegions$regions, subject = genes)
>     >
>     > ## Make the plot
>     > plotCluster(idx=1, regions=genomeRegions$regions, annotation=annotation,
>     +     coverageInfo=genomeDataRaw$coverage, groupInfo=genomeInfo$pop,
>     +     txdb=TxDb.Hsapiens.UCSC.hg19.knownGene)
>     Warning in getIdeoGR(data) :
>       geom(ideogram) need valid seqlengths information for accurate mapping,
>                      now use reduced information as ideogram...
>     Warning: `panel.margin` is deprecated. Please use `panel.spacing`
> property instead
>     Error in rep(startY, each = length(yy)) :
>       attempt to replicate an object of type 'language'
>     Calls: plotCluster ... layout_karyogram -> layout_karyogram ->
> .local -> geom_arch_flip2
>     Execution halted
>     ```
>
> *   checking tests ...
>     ```
>      ERROR
>     Running the tests in ‘tests/test-all.R’ failed.
>     Last 13 lines of output:
>       5: print(e1)
>       6: print(e1)
>       7: .local(x, ...)
>       8: layout_karyogram(obj, cytobands = cytoband, geom = NULL)
>       9: layout_karyogram(obj, cytobands = cytoband, geom = NULL)
>       10: .local(data, ...)
>       11: geom_arch_flip2(df.tri.p2, aes(x = x, y = y, xend = xend,
> yend = yend, height = height),
>              color = "black", size = 0.5)
>
>       ══ testthat results
> ═══════════════════════════════════════════════════════════
>       OK: 7 SKIPPED: 0 FAILED: 1
>       1. Error: (unknown) (@test_adv-plotCluster.R#38)
>
>       Error: testthat unit tests failed
>       Execution halted
>     ```
>
> *   checking re-building of vignette outputs ... WARNING
>     ```
>     Error in re-building vignettes:
>       ...
>     Warning in citation("BiocStyle") :
>       no date field in DESCRIPTION file of package 'BiocStyle'
>     Warning in citation("biovizBase") :
>       no date field in DESCRIPTION file of package 'biovizBase'
>     Warning in citation("TxDb.Hsapiens.UCSC.hg19.knownGene") :
>       no date field in DESCRIPTION file of package
> 'TxDb.Hsapiens.UCSC.hg19.knownGene'
>     Writing 24 Bibtex entries ... OK
>     Results written to file 'derfinderPlotRef.bib'
>     Quitting from lines 233-235 (derfinderPlot.Rmd)
>     Error: processing vignette 'derfinderPlot.Rmd' failed with diagnostics:
>     subscript contains invalid names
>     Execution halted
>     ```
>
> ## Notes from Leo: looks like the issue here is layout_karyogram()
> from ggbio that is used by plotCluster()
> https://github.com/leekgroup/derfinderPlot/blob/master/R/plotCluster.R.
>
> _______________________________________________
> Bioc-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>



More information about the Bioc-devel mailing list