Troubleshooting Build Report

Often common Error’s will arise as R develops and matures or as Bioconductor packages are modified and advance. This document provides some guidance on Error’s and potential solutions.

Bioconductor 3.11 with R 4.0

R switched from 3.x to 4.0 which generally means some significant changes.

[ Back to Bioconductor / R List ]

S3 method registration

Many packages are currently failing because of undeclared S3 methods in the NAMESPACE. There is some background information found on the R developers blog post: S3 Method Lookup

This ERROR takes many different forms on the build report. Some of the more common forms include

Solution: Register the S3 method in the NAMESPACE

S3method(<function>, <dispatch>)

A simple example which effects many packages is a S3 plotting method. The following line would be added to the package NAMESPACE.

S3method(plot, TCC)  # example from TCC package

[ Back to Bioc 3.11 R 4.0 ]

Removed Setting in R CMD config

The source of the ERROR is utilizing settings in package configure script that have been removed or replaced. There is a section of R NEWS “R CMD config no longer knows about the unused settings F77 and FCPIFCPLAGS, nor CXX98 and similar.” Executing the configuration script when installing the package fails, and the output contains lot of messages along the lines of the following:

Solution: Replace instances of “${R} CMD config F77” with “${R} CMD config FC

[ Back to Bioc 3.11 R 4.0 ]

Conditional Length > 1

In R 4.0 a conditional with a length greater than 1 will produce a WARNING. On the Bioconductor Daily Builder and Single Package Builder this is increased to an ERROR.

Traditionally if / while statements could accept vectors using the first element as the conditional value and ignoring the remaining values. This now produces a WARNING as seem in this dummy example and documented at Conditions of Length Greater Than One

> if (c(TRUE, FALSE)) {}
Warning message:
In if (c(TRUE, FALSE)) { :
    the condition has length > 1 and only the first element will be used

Solution: Bioconductor increased the severity as in most cases this is a misjudgment in the length of the argument rather than intentional. The code should be reviewed to see if argument is being assigned correctly. In most cases it might be appropriate to use an any( ) or all( ) surrounding the vector.

[ Back to Bioc 3.11 R 4.0 ]

Scalar / Vector Logic

This is not a change in R yet but we have been notified that it is forth coming and have escalated to an ERROR on our daily builders in preparation. This type of ERROR occurs with the misuse of && and ||. The double && and || imply a scalar comparison rather than a vector comparison that the singular & and | expect. See the dummy example below:

Error in c(TRUE, TRUE) && TRUE :
   'length(x) = 2 > 1' in coercion to 'logical(1)'

Solution: Most cases are misjudgment and misunderstanding of the use of a scalar comparison from a vector comparison. Changing the double && / || to a singular & / | will generally be sufficient if a vector comparison is intended or having the vector argument use an appropriate any( ) or all( ) surrounding the vector will result in the appropriate scalar comparison. Note: If this comparison is in a conditional please see the section above; any( ) or all( ) will most likely be a better alternative.

[ Back to Bioc 3.11 R 4.0 ]

Class == vs is/inherits

While this isn’t a change in R / Bioconductor as of yet, there is strong discussion about the affects and consequences of this code structure. A better discussion and explanation can be found When you think class(.) == *, think again!

The sum up is class( x ) == "foo" should be avoided. It can be misleading if classes extend other classes. The better option is to use is( x , "foo") or inherits(x, "foo").

This is also advised in Bioconductor best practices

[ Back to Bioc 3.11 R 4.0 ]

Partial Argument Matching

There is now more strict checking of argument matching with regards to partial argument matching. Best described with the following example

setGeneric(“mycoolfunction”,   function(object,  breaks)
    signature=c(object=”GRanges”, break=”GRanges”), 

Notice the generic uses breaks while the setMethod uses break; This is an example of a partial argument match that will no longer be valid.

Partial argument matching when envoking functions should also be avoided as part of best practices. For example

mycoolfunction <- function( x, myargum, secondarg ) { code }

mycoolfunction(x=2, myar=1:2, second=3)          # BAD Coding!

mycoolfunction(x=2, myargum=1:2, secondarg=3)    # Good Practice!

[ Back to Bioc 3.11 R 4.0 ]

Package inputenc Error: Invalid UTF-8

This ERROR started to appear on tokay2 (windows) in Spring 2020. We are not sure the exact source of the ERROR (change in MiKTek, Change in R, other?) but the solution is simple:

Please place \usepackage[utf8]{inputenc} in the beginning of your Sweave vignette right after the \documentclass line.

[ Back to Bioc 3.11 R 4.0 ]

Dependency Issues

Dependency Issues can fall into a few sub-categories:

CRAN binaries not available for R 4.0

The fall cycle of Bioconductor uses R-devel in preparation for the new release of R in the spring. This is always a slightly more disruptive cycle with regards to package dependencies from CRAN. CRAN over the next 6 months leading up to the new release of R will make binaries for Windows and MacOS available. As they become available the Bioconductor builders will automatically add these binaries. If the binaries have not been created yet, they will be unavailable and result in a package not available error. Bioconductor will not go to extra efforts to find work around to install these packages; when they are available, they will be added. Solution: Please be patient!

Package have been removed from CRAN

CRAN packages are occasionally removed. Unfortunately, Bioconductor will only allow package dependencies to be actively maintained packages on CRAN or Bioconductor. A package will have to alter their package to not utilize code and not rely on this dependency. You may of course try to pentition CRAN for reinstatement or reach out to the package maintainer to fix and submit to CRAN. Good Luck!

Package has been removed from Bioconductor

We try to be more aware of orphaned packages and packages that remain broken for extended periods of time. Package deprecation and removal occurs and packages will have to alter to not utilize code from these packages or could potential offer to take over maintenance of broken packages but that would require original maintainers permission. Bioconductor Package deprecation is announced throughout the release cycle on the mailing list and support site to try and allow dependent packages time to adjust code before removal. This release the most notable maintainer requested deprecation from 3.10 (therefore removed in 3.11) are SNPchip and GenomeGraphs. A full list of deprecated packages can be found List of Deprecated Packages 3.10. We also documented removed packages on our Removed Package Page

[ Back to Bioc 3.11 R 4.0 ]

Deprecated Functions

Functions can be deprecated, defunct, and eventually removed. Bioconductor tries to enforce this progression to allow maintainers to adjust code. Most deprecated or defunct functions will (should) suggest the alternative. The following are noted in Bioconductor 3.11


Error : RangedData objects are defunct. Please migrate your code to use GRanges
  or GRangesList objects instead. See IMPORTANT NOTE in ?RangedData


'normalize' is defunct.
Use ''normalize,SingleCellExperiment-method' is defunct.
Use 'logNormCounts' instead' instead.


'calculateQCMetrics' is defunct.
Use 'perCellQCMetrics' instead.

[ Back to Bioc 3.11 R 4.0 ]