[Bioc-devel] Vignettes with many output graphics - How to fulfill the Bioc build requirements, best practises?
James W. MacDonald
jm@cdon @end|ng |rom uw@edu
Tue Mar 22 21:05:06 CET 2022
If the pages from the PDF are essentially static (for your vignette, that is), why not run it once, get the pngs, save them somewhere, and use eval = FALSE in the knitr headers for the plot* fuctions. Then you will speed things up, there won't be all this extra PDF documentation that's +/- not part of the vignette, and it should run much faster.
From: Bioc-devel <bioc-devel-bounces using r-project.org> On Behalf Of Christian Arnold
Sent: Tuesday, March 22, 2022 3:33 PM
To: bioc-devel using r-project.org
Subject: [Bioc-devel] Vignettes with many output graphics - How to fulfill the Bioc build requirements, best practises?
Hi, I wanted to reach out for some thoughts on the following problem I am facing with a package I recently submitted to Bioc. In essence, I am struggling with the 15 minutes time limit for R CMD check as well as the package size limit of 5 MB. The latter is more important, so let's focus on that:
It is a quite large package with many functions, a full workflow for building gene-regulatory networks, and we want to include a detailed workflow vignette where the most important output plots are shown and explained, to make it user-friendly and easy to apply.
For various plot* functions produce PDFs that have many pages (sometimes dozens or even hundreds), only some of which should be shown in the vignette (say page 2 and 5 from PDF A, and page 1 and 2 from PDF B, etc). Including selected pages from a PDF doesnt seem to be possible with BiocStyle (please correct me if I am wrong), so currently, I am automatically converting each page of each of the various PDFs as a png image, to include selected pages then in the Vignette via knitr::include_graphics. This works well, but leads to the repo being too big (currently 11 MB) when being build - because the original images as well as the resulting htmls in the inst folder contain the images, making it bigger than 5 MB. I could reduce the resolution of the images much further, but this feels wrong also. In total, we talk about 40 or so images that I wanted to share across the different vignettes.
Are there any thoughts on how I can proceed here without spending a lot of time on re-designing the package logic (which I unfortunately dont have at this point) and without sacrificing the usability of the package (I could just remove the Workflow vignette or host it externally I guess)?
Thanks, your input is very appreciated.
Bioc-devel using r-project.org mailing list
More information about the Bioc-devel