Re: [Bioc-devel] BiocFileCache Caching ERROR on devel builders

2021-07-30 Thread Gavin Lloyd
This might be the structToolbox package.

I have reverted the part of the commit where I made changes to the cache 
location and pushed to devel (I didnt make changes to cache location on release 
branch). Hopefully that is enough to correct it.

Apologies to everyone for any issues I may have inadvertently caused.

Best regards,

Gavin



From: Bioc-devel  on behalf of 
lori.sheph...@roswellpark.org 
Sent: 30 July 2021 19:23
To: bioc-devel@r-project.org
Subject: [Bioc-devel] BiocFileCache Caching ERROR on devel builders

We are seeing a BiocFileCache default directory ERROR appearing on the devel 
build reports.  This seems to be a recent ERROR, introduced sometime in the 
last week,  and we are trying to track down the offending package that builds 
the location.  If you see this ERROR in your package you may ignore for now -- 
If you are the culprit of building this location, please fix asap.

Thank you



Lori Shepherd

Bioconductor Core Team

Roswell Park Comprehensive Cancer Center

Department of Biostatistics & Bioinformatics

Elm & Carlton Streets

Buffalo, New York 14263


This email message may contain legally privileged and/or confidential 
information.  If you are not the intended recipient(s), or the employee or 
agent responsible for the delivery of this message to the intended 
recipient(s), you are hereby notified that any disclosure, copying, 
distribution, or use of this email message is prohibited.  If you have received 
this message in error, please notify the sender immediately by e-mail and 
delete this email message from your computer. Thank you.
[[alternative HTML version deleted]]

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel

[[alternative HTML version deleted]]

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


Re: [Bioc-devel] ExperimentHub package development - Windows OS specific error

2021-03-03 Thread Gavin Lloyd
I did not get this error on my Windows machine; ExperimentHub can find the 
alzzh_gwas_top100 dataset in Bioc 3.13 (devel).


Your snapshot date is older than mine. R reported my snapshot date as 
"2021-03-02"


Maybe you need to clear the cache?


You can request all available snapshot dates with possibleDates and set a 
specific one if you want to with snapshotDate. See ?ExperimentHub for info.


I am not sure what best practice would be in terms of Bioc 3.13 (should you fix 
a snapshot date in your package, or always use the most recent date, or allow 
the user to specify a snapshot date...?). You could ask your reviewer for 
advice in this regard, or maybe someone on the mailing list will comment.


Gavin





From: Murphy, Alan E 
Sent: 02 March 2021 20:07
To: Gavin Lloyd (College of Medical and Dental Sciences); 
bioc-devel@r-project.org
Subject: Re: ExperimentHub package development - Windows OS specific error

Hey Gavin,

This worked perfectly, thanks!

However, this did lead to another error where one of the datasets from the 
metadata file wasn't found in the ExperimentHub dataset. Again this is Windows 
specific and the dataset in question (alzh_gwas_top100) does exist:


> ### ** Examples
>
>   alzh_gwas_top100()
using temporary cache D:\temp\RtmpCEujsj/working_dir\RtmpY9HMAa/BiocFileCache
snapshotDate(): 2020-04-27
Error in alzh_gwas_top100() :
  resource alzh_gwas_top100 not found in ExperimentHub

This error is thrown in zzz.R here:

objs <- read.csv(system.file("extdata", "metadata.csv",
   package="ewceData"),
   stringsAsFactors=FALSE,fileEncoding = "UTF-8-BOM")$Title
  if (!length(objs))
stop("no objects found")

  ## Functions to load objects by name:
  ns <- asNamespace(pkgname)
  sapply(objs,
 function(xx) {
   func = function(metadata = FALSE) {
 if (!isNamespaceLoaded("ExperimentHub"))
   attachNamespace("ExperimentHub")
 eh <- query(ExperimentHub(), "ewceData")
 ehid <- names(query(eh, xx))
 if (!length(ehid))
   stop(paste0("resource ", xx,
   " not found in ExperimentHub"))
 if (metadata)
   eh[ehid]
 else eh[[ehid]]
   }
   assign(xx, func, envir=ns)
   namespaceExport(ns, xx)
 })

I checked and objs does contain the correct list of titles so the issue isn't 
there. Sorry about the continuation in the question but does anyone know why 
this could be happening?

Kind regards,
Alan.


From: Gavin Lloyd 
Sent: 02 March 2021 18:10
To: Murphy, Alan E ; bioc-devel@r-project.org 

Subject: Re: ExperimentHub package development - Windows OS specific error


This email from g.r.ll...@bham.ac.uk originates from outside Imperial. Do not 
click on links and attachments unless you recognise the sender. If you trust 
the sender, add them to your safe senders 
list<https://spam.ic.ac.uk/SpamConsole/Senders.aspx> to disable email stamping 
for this address.




Your file seems to be encoded as UTF-8-BOM.


When I read it in on my Windows 10 machine the Title column has extra 
characters at the front ("�..Title"), which is why your function returns "no 
object found" when checking for the Title column.


If I resave your file with UTF-8 format your function works as expected and I 
am able to install your package.


Gavin



From: Bioc-devel  on behalf of Murphy, Alan E 

Sent: 02 March 2021 17:00
To: bioc-devel@r-project.org
Subject: [Bioc-devel] ExperimentHub package development - Windows OS specific 
error

Hi all,

My apologies, I have emailed before on a related issue but now think I have 
found a potential cause of the issue I am having but can't seem to find a fix.

I am working on an ExperimentHub data package; 
ewceData<https://github.com/neurogenomics/ewceData>, which fails checks on 
Windows OS but passes on Linux and Mac. On Windows, the package fails to 
install with the following output:


Error: package or namespace load failed for 'ewceData':
 .onLoad failed in loadNamespace() for 'ewceData', details:
  call: fun(libname, pkgname)
  error: no objects found
Error: loading failed
Execution halted

It seems like this error is caused by my onload function. The onload function I 
use (zzz.R) should allow easy access to the stored datasets, allowing a user to 
call the dataset like dataset1(). The error note printed appears because the 
metadata.csv file did not read properly

.onLoad <- function(libname, pkgname) {
  objs <- read.csv(system.file("extdata", "metadata.csv",
   package="ewceData"),
   stringsAsFactors=FALSE)$Ti

Re: [Bioc-devel] ExperimentHub package development - Windows OS specific error

2021-03-02 Thread Gavin Lloyd
Your file seems to be encoded as UTF-8-BOM.


When I read it in on my Windows 10 machine the Title column has extra 
characters at the front ("�..Title"), which is why your function returns "no 
object found" when checking for the Title column.


If I resave your file with UTF-8 format your function works as expected and I 
am able to install your package.


Gavin



From: Bioc-devel  on behalf of Murphy, Alan E 

Sent: 02 March 2021 17:00
To: bioc-devel@r-project.org
Subject: [Bioc-devel] ExperimentHub package development - Windows OS specific 
error

Hi all,

My apologies, I have emailed before on a related issue but now think I have 
found a potential cause of the issue I am having but can't seem to find a fix.

I am working on an ExperimentHub data package; 
ewceData, which fails checks on 
Windows OS but passes on Linux and Mac. On Windows, the package fails to 
install with the following output:


Error: package or namespace load failed for 'ewceData':
 .onLoad failed in loadNamespace() for 'ewceData', details:
  call: fun(libname, pkgname)
  error: no objects found
Error: loading failed
Execution halted

It seems like this error is caused by my onload function. The onload function I 
use (zzz.R) should allow easy access to the stored datasets, allowing a user to 
call the dataset like dataset1(). The error note printed appears because the 
metadata.csv file did not read properly

.onLoad <- function(libname, pkgname) {
  objs <- read.csv(system.file("extdata", "metadata.csv",
   package="ewceData"),
   stringsAsFactors=FALSE)$Title
  if (!length(objs))
stop("no objects found")

It would seem the issue is with either read.csv or system.file and is specific 
to Windows OS. Just to note I also do import read.csv from utils.

If anyone has come across an issue like this before or have good guesses for a 
possible fix it would be greatly appreciated?

Kind regards,
Alan,

Alan Murphy
Bioinformatician
Neurogenomics lab
UK Dementia Research Institute
Imperial College London

[[alternative HTML version deleted]]

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel

[[alternative HTML version deleted]]

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


Re: [Bioc-devel] Cannot reproduce a regionReport 1.21.7 error on the Bioc 3.11 Linux builder

2020-04-24 Thread Gavin Lloyd
I also had an issue related to cropping using BiocStyle pdf_document, and used 
the same fix.
https://github.com/Bioconductor/BiocStyle/issues/75
Gavin

From: Bioc-devel  on behalf of 
mtmorgan.b...@gmail.com 
Sent: 24 April 2020 11:26:30
To: Leonardo Collado Torres; Bioc-devel
Cc: Andrzej Oleś
Subject: Re: [Bioc-devel] Cannot reproduce a regionReport 1.21.7 error on the 
Bioc 3.11 Linux builder

Thanks for the detective work Leo; to me it sounds like, for robust output 
(function more important than form) BiocStyle should not try to crop images.

Martin

On 4/24/20, 12:52 AM, "Bioc-devel on behalf of Leonardo Collado Torres" 
 wrote:

Hi Bioc-devel again,


I believe that I have found the source of my regionReport problem and
a workaround. We'll know tomorrow if it goes through the Bioc builds
but it works at
https://github.com/leekgroup/regionReport/actions/runs/86364716.

The problem is related to
https://github.com/ropensci/magick/issues/171 and similar issues. The
workaround is to use `crop = NULL` on R Markdown code chunks to
disable the default image cropping behavior by
BiocStyle::html_document, and thus avoid cache issues from magick (R)
and ImageMagick (not R).

Both the Bioc-devel Linux machine and GitHub Actions using
Bioconductor devel run into a problem where there's not enough
resources in the cache for cropping the images produced by
regionReport::derfinderReport(). Either (a) the Bioc-devel Windows and
macOS machines don't have magick installed (so no cropping gets
attempted), (b) use a compiled version of magick that ships with the
right version of ImageMagick, or (c) they have more resources than the
bioc Linux build machine and the bioc devel docker running on GHA
Linux

In any case, disabling cropping circumvents this issue.


Here's the full investigative report.




## A new lead

I recently stumbled upon [1] and re-reading it now I see that they
link to [2] which mentions that BiocStyle crops by default and that
this can be turned off using `crop = NULL`.

regionReport uses BiocStyle::html_document both for its vignettes as
well as the reports it makes by default. Actually at [3], which was
built using the Bioconductor devel docker & GitHub Actions (GHA), I
see tons of messages that are similar to:

## The magick package is required to crop
"basicExploration_files/figure-html/pvals-1.png" but not available.

For reference, [4] is how that example from
regionReport::derfinderReport() looks built using GHA. I copied the
log of messages to a gist at [5]. From [6] I found [7] where Mike
Smith explains to Aaron Lun the default behavior of BiocStyle and
again suggests to use `crop = NULL` just like Yihui Xie mentioned
earlier at [2]. I see at [8] that Kevin Rue-Albrecht also ran into a
`crop = NULL` problem in iSEE.


So I have a good lead now!


## Adding magick to Suggests

We can see clearly that magick is not available on my GitHub Actions
run using the Biocondutor devel docker: regionReport 1.21.7 doesn't
mention magick on it's DESCRIPTION so it's never installed on GHA.
However, magick is likely installed on the Bioconductor 3.11 Linux
build machine and thus it is used for cropping. At [9] I bumped
regionReport to 1.21.8 after adding magick to suggests. Actually, this
is what Yihui Xie recommends BiocStyle could/should do in [2]. That
crashed and burned on GHA Linux with Bioc-docker at [10], thus
reproducing the Linux build machine error.

Quitting from lines 224-229 (basicExploration.Rmd)
35Error: processing vignette 'regionReport.Rmd' failed with diagnostics:
36R: cache resources exhausted

`/tmp/RtmpfaoqUE/Rbuild74c3a6bf655/regionReport/vignettes/report/html/basicExploration_files/figure-html/plotRegions-17.png'
@ error/cache.c/OpenPixelCache/4083

Actually, this error message is more informative than the one from the
Bioc Linux builder as it gives the actual image name where it all
burned down.


## Moving problematic code from the vignette to an example

At [11] I moved the problematic code to an example instead of the
vignette. On GHA, it failed again at [12] predictably on another image
than in [10]. Also predictably, R CMD build worked this time, but R
CMD check failed. However, now the I get the full logs that help me
see the details much better and link it to code [13] (so if that was
the bug source, I would know where to look).

Quitting from lines 399-400 (basicExploration.Rmd)
355Error in magick_image_trim(image, fuzz) :
356 R: cache resources exhausted

`/__w/regionReport/regionReport/check/regionReport.Rcheck/derfinderReport-example/basicExploration/basicExploration_files/figure-html/genomeOverview3-1.png'
@ error/cache.c/OpenPixelCache/4083
357Calls: