TransBioInfoLab / coMethDMR

Detect Regions of Concurrent Differential Methylation
https://transbioinfolab.github.io/coMethDMR/
7 stars 2 forks source link

Package Check Time #2

Closed gabrielodom closed 3 years ago

gabrielodom commented 3 years ago

Per the Bioconductor build report, our package check timed out at 15 minutes: http://bioconductor.org/spb_reports/coMethDMR_buildreport_20210422091842.html

I am going through the vignettes now to see if we can make them faster (smaller data examples perhaps)?

gabrielodom commented 3 years ago

Vignette 1 takes 55 seconds to knit. The AnnotateResults() function takes much longer than I expected.

gabrielodom commented 3 years ago

Vignette 2 takes 7 minutes 50 seconds to knit. We need to find a smaller subset of regions to analyze.

gabrielodom commented 3 years ago

Vignette 2 takes 5 minutes and 10 seconds to knit on Mac, so it's not just a Windows problem.

gabrielodom commented 3 years ago

I cut the data in two ways:

  1. After we select regions from Chromosome 22, I retain (as an example only) the first 10 regions, then
  2. We remove CpGs from the betas data frame which are not members of the first 10 regions on Chromosome 22

Now, Vignette 2 takes 2 minutes and 15 seconds to knit on Mac.

gabrielodom commented 3 years ago

The R CMD check takes 16 minutes 47 seconds (R marked duration: 14'40"). The most expensive components are:

@tiagochst, any ideas on how to tighten these up? I'm going to modify the examples in NameRegion(), CloseBySingleRegion(), and OrderCpGsByLocation(). I don't remember writing any part of AnnotateResults(). Also, are the "checking examples" and "checking examples with --run-donttest" options duplicates of each other? We only have one function with \donttest{}.

gabrielodom commented 3 years ago

After @tiagochst's changes, the real time for the check (on Mac) is 13'39", and the computing time is 11'54".

I'll work on a few other things later tonight, and test it on my Windows machine in the office tomorrow.

gabrielodom commented 3 years ago

Timings after updates to the examples:

Total R elapsed time: 10'56"

When I run the example for CoMethAllRegions() in the console, it takes less than 2 seconds; no idea what's going on there.

gabrielodom commented 3 years ago

I discovered that R CMD check runs all the examples, including the components wrapped in \donttest{}. This had the additional side effect of creating the data set closeByRegions.rds even though we had wrapped the call to WriteCloseByRegions() in a \donttest{}. That was one of the CRAN notes. It's gone now that we just commented out the call in the example.

Also, I removed all calls to CoMethAllRegions() in the tests for lmmTest() and lmmTestAllRegions(), and manually replicated the output necessary to test those functions.

gabrielodom commented 3 years ago

New times: real = 11'12"; R computing expended = 9'26"

gabrielodom commented 3 years ago

We passed the first round of build checks