Import a Bioconductor package that is only used in a vignette/.Rmd script
1
0
Entering edit mode
@a784f8f2
Last seen 12 months ago
United Kingdom

My Bioconductor package is receiving Errors about a package not existing.

I have an R package with Bioconductor. In the vignettes folder, I have several .Rmd files that have the following chunk at the top:

title: 'Manuscripts'
package: pkgName
bibliography: pkgName.bib
output:
  **BiocStyle**::html_document:
    toc_float: true
    tidy: TRUE
    border-width: 5px
vignette: >
  \usepackage[utf8]{inputenc}
  %\VignetteIndexEntry{"Title"}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
  %\VignettePackage{pkdName}

When I run devtools:check(), I receive error messages of the format:

   --- re-building bioconductor.Rmd using rmarkdown
   Error: processing vignette bioconductor.Rmd  failed with diagnostics:
   **there is no package called BiocStyle**
   --- failed re-building bioconductor.Rmd

I noticed that BiocStyle is not in my DESCRIPTION file. So, based on instructions here, I did:

usethis::use_package("BiocStyle")

and this seemed to add BiocStyle, to the "Imports" of my DESCRIPTION file. It did not add a requirement such as (>= 0.12.2).

I then reran devtools:check(), and received a message:

Warning in (function (dep_name, dep_ver = "*")  :
  Dependency package BiocStyle not available.
Error: Dependency package(s) BiocStyle not available.

I note that my package had been working on Bioconductor for quite a while until I suddenly received emails from the team pointing me to this error. I also notice that, unlike other imported packages in my package, BiocStyle is not called upon in any of the actual R scripts (i.e. in an R/.R file within my package). Instead, BiocStyle only makes an appearance at the top of the vignette/.Rmd files. I suspect this is why I am having this error. I suppose it is expected for all packages used to be mentioned in the DESCRIPTION file, but those I supposed are only for packages that are actually called upon in a R/.R file. How should I resolve this issue? (i.e. how do I account for a package, like BiocStyle, that I only used in a vignette file)?

Thank you for any pointers you may be able to provide.

FILES:

Description file

Package: pkgName
Version: pkgVerson
Title: pkgTitle
Description: pkgDescription
Authors@R: pkgAuthors
License: pkgLicense
Depends: R (>= 3.6.0)
Imports: 
    BiocStyle,
    DelayedArray (>= 0.12.2),
    dplyr (>= 0.7.2),
    GGally (>= 1.3.2),
    ggplot2 (>= 2.2.1),
    graphics (>= 3.5.0),
    grDevices (>= 3.5.0),
    grid (>= 3.5.0),
    gridExtra (>= 2.3),
    hexbin (>= 1.27.1),
    Hmisc (>= 4.0.3),
    htmlwidgets (>= 0.9),
    methods (>= 3.5.2),
    plotly (>= 4.7.1),
    plyr (>= 1.8.4),
    RColorBrewer (>= 1.1.2),
    reshape (>= 0.8.7),
    shiny (>= 1.0.5),
    shinycssloaders (>= 0.2.0),
    shinydashboard (>= 0.6.1),
    stats (>= 3.5.0),
    stringr (>= 1.3.1),
    SummarizedExperiment (>= 1.16.1),
    tidyr (>= 0.7.0),
    utils (>= 3.5.0)
VignetteBuilder: knitr
Suggests:
    BiocGenerics (>= 0.29.1),
    data.table (>= 1.11.8),
    EDASeq (>= 2.14.0),
    edgeR (>= 3.22.2),
    gtools (>= 3.5.0),
    knitr (>= 1.13),
    matrixStats (>= 0.53.1),
    rmarkdown (>= 1.10),
    roxygen2 (>=3.0.0),
    RUnit (>= 0.4.32),
    tibble (>= 1.4.2),
biocViews: Clustering, DataImport, DifferentialExpression,
    GeneExpression, MultipleComparison, Normalization,
    Preprocessing, QualityControl, RNASeq, Sequencing, Software,
    Transcription, Visualization
RoxygenNote: 7.1.1
BugReports: pkgBugs
URL: pkgURL
NeedsCompilation: no
Packaged: pkgDate
LazyData: true
Encoding: UTF-8

Namespace

# Generated by roxygen2: do not edit by hand

> export(convertSEPair) export(convertSESubsetGenes)
> export(plotClusters) export(plotLitre) export(plotLitreApp)
> export(plotPCP) export(plotPCPApp) export(plotSM) export(plotSMApp)
> export(plotVolcano) export(plotVolcanoApp)
> importFrom(DelayedArray,DelayedArray) importFrom(GGally,ggpairs)
> importFrom(GGally,wrap) importFrom(Hmisc,cut2)
> importFrom(RColorBrewer,brewer.pal)
> importFrom(SummarizedExperiment,SummarizedExperiment)
> importFrom(SummarizedExperiment,assay)
> importFrom(SummarizedExperiment,rowData) importFrom(dplyr,"%>%")
> importFrom(dplyr,arrange) importFrom(dplyr,filter)
> importFrom(dplyr,one_of) importFrom(dplyr,select)
> importFrom(dplyr,starts_with) importFrom(ggplot2,aes)
> importFrom(ggplot2,aes_string) importFrom(ggplot2,coord_cartesian)
> importFrom(ggplot2,coord_fixed) importFrom(ggplot2,element_text)
> importFrom(ggplot2,geom_abline) importFrom(ggplot2,geom_boxplot)
> importFrom(ggplot2,geom_hex) importFrom(ggplot2,geom_line)
> importFrom(ggplot2,geom_point) importFrom(ggplot2,geom_ribbon)
> importFrom(ggplot2,ggplot) importFrom(ggplot2,ggtitle)
> importFrom(ggplot2,labs) importFrom(ggplot2,scale_fill_gradientn)
> importFrom(ggplot2,scale_fill_manual)
> importFrom(ggplot2,scale_x_discrete) importFrom(ggplot2,theme)
> importFrom(ggplot2,theme_gray) importFrom(ggplot2,xlab)
> importFrom(ggplot2,xlim) importFrom(ggplot2,ylab)
> importFrom(ggplot2,ylim) importFrom(grDevices,dev.off)
> importFrom(grDevices,jpeg) importFrom(grDevices,rainbow)
> importFrom(graphics,plot) importFrom(grid,grid.draw)
> importFrom(gridExtra,arrangeGrob) importFrom(hexbin,hcell2xy)
> importFrom(hexbin,hexbin) importFrom(htmlwidgets,onRender)
> importFrom(methods,is) importFrom(plotly,config)
> importFrom(plotly,ggplotly) importFrom(plotly,layout)
> importFrom(plotly,plotlyOutput) importFrom(plotly,renderPlotly)
> importFrom(plyr,mapvalues) importFrom(reshape,melt)
> importFrom(shiny,HTML) importFrom(shiny,actionButton)
> importFrom(shiny,basicPage) importFrom(shiny,bootstrapPage)
> importFrom(shiny,br) importFrom(shiny,div) importFrom(shiny,em)
> importFrom(shiny,fluidPage) importFrom(shiny,img)
> importFrom(shiny,numericInput) importFrom(shiny,observeEvent)
> importFrom(shiny,p) importFrom(shiny,reactive)
> importFrom(shiny,reactiveValues) importFrom(shiny,renderPrint)
> importFrom(shiny,req) importFrom(shiny,selectInput)
> importFrom(shiny,selectizeInput) importFrom(shiny,shinyApp)
> importFrom(shiny,shinyServer) importFrom(shiny,shinyUI)
> importFrom(shiny,sliderInput) importFrom(shiny,strong)
> importFrom(shiny,verbatimTextOutput)
> importFrom(shinycssloaders,withSpinner) importFrom(shinydashboard,box)
> importFrom(shinydashboard,dashboardBody)
> importFrom(shinydashboard,dashboardHeader)
> importFrom(shinydashboard,dashboardPage)
> importFrom(shinydashboard,dashboardSidebar)
> importFrom(shinydashboard,menuItem)
> importFrom(shinydashboard,sidebarMenu)
> importFrom(shinydashboard,tabItem) importFrom(shinydashboard,tabItems)
> importFrom(stats,coef) importFrom(stats,cutree) importFrom(stats,dist)
> importFrom(stats,hclust) importFrom(stats,lm)
> importFrom(stats,predict) importFrom(stats,qt)
> importFrom(stats,setNames) importFrom(stringr,str_replace)
> importFrom(stringr,str_trim) importFrom(tidyr,crossing)
> importFrom(tidyr,gather) importFrom(utils,combn) importFrom(utils,str)
> importFrom(utils,write.table)

Please note I asked a similar question on StackOverflow (here), but I'm asking again here as I tried all the solutions there and they did not resolve my issue. Thank you.

Bioconductor PackageType BiocStyle • 1.1k views
ADD COMMENT
1
Entering edit mode

Hi lavanilla44,

This support site is for questions about the usage of the Bioconductor software. For questions about the developement of your package please ask on the bioc-devel mailing list. Alternatively you can ask on the developer-forum channel of the community-bioc Slack.

Thanks,

H.

ADD REPLY
1
Entering edit mode
shepherl 4.1k
@lshep
Last seen 1 day ago
United States

See the previous reply that development questions should be asked on the bioc-devel mailing list. The solution was posted there https://stat.ethz.ch/pipermail/bioc-devel/2023-May/019692.html and original post https://stat.ethz.ch/pipermail/bioc-devel/2023-March/019555.html

ADD COMMENT
0
Entering edit mode

Thank you, I can try to ask on the mailing list or Slack channel. Thank you for sharing that solution. I unfortunately tried the same approach (added "BiocStyle" to my Suggests field of the DESCRIPTION file) -- but the error remained.

ADD REPLY
0
Entering edit mode

The conversation has continued on slack . You have to push to git.bioconductor.org for it to reflect on Bioconductor. And if it fails locally, make sure the package is installed locally.

ADD REPLY

Login before adding your answer.

Traffic: 485 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6