[Bioc-devel] Possible problems with BiocParallel and R cmd check on Github
    Giulia Pais 
    g|u||@p@|@1 @end|ng |rom gm@||@com
       
    Wed Jul 29 19:18:35 CEST 2020
    
    
  
Hi bioconductor team,
we are currently developing a package for future submission on 
bioconductor which you can find here 
https://github.com/calabrialab/ISAnalytics.
We use Github actions to keep track of R cmd checks at every commit, and 
this time, surprisingly for us, we had a failure on R cmd checks for 
windows (which is odd, since we develop on windows and performing check 
on 2 different windows machines didn't raise any error or warning) and 
we suspect this could be tied to the use of BiocParallel. For Windows, 
in fact, we use SnowParam instead of MulticoreParam and as the vignette 
and manual of BiocParallel specifies we must ensure that every worker is 
loaded with the proper dependencies, but apparently this is not 
necessary if the function to execute in bplapply belongs to the package 
in question. Here is the code of the function that might raise some 
problems:
.import_type <- function(q_type, files, workers) {
   files <- files %>% dplyr::filter(.data$Quantification_type == q_type)
   # Register backend according to platform
   if (.Platform$OS.type == "windows") {
     p <- BiocParallel::SnowParam(workers = workers, stop.on.error = FALSE)
   } else {
     p <- BiocParallel::MulticoreParam(workers = workers, stop.on.error 
= FALSE)
   }
   # Import every file
   suppressMessages(suppressWarnings({
     matrices <- BiocParallel::bptry(
       BiocParallel::bplapply(files$Files_chosen, FUN = function(x) {
         matrix <- ISAnalytics::import_single_Vispa2Matrix(x)
       }, BPPARAM = p)
     )
     }))
   BiocParallel::bpstop(p)
   correct <- BiocParallel::bpok(matrices)
   imported_files <- files %>% dplyr::mutate(Imported = correct)
   matrices <- matrices[correct]
   # Bind rows in single tibble for all files
   if (purrr::is_empty(matrices)) {
     return(NULL)
   }
   matrices <- purrr::reduce(matrices, function(x, y) {
     x %>% dplyr::bind_rows(y) %>% dplyr::distinct()
   })
   list(matrices, imported_files)
}
The report of the Github action can be found here: 
https://github.com/calabrialab/ISAnalytics/runs/923261561
The check apparently fails with these warnings: Warning - namespace 
'ISAnalytics' is not available and has been replaced. We tried adding 
'library(ISAnalytics)' and 'require(ISAnalytics)' but if we do that 
BiocCheck fails with a warning, prompting for removal of this lines. 
Could this be a real issue with our package or just a problem with 
Github actions?
Thanks in advance,
Giulia Pais
    
    
More information about the Bioc-devel
mailing list