[Bioc-devel] CRAN package with Bioconductor dependencies

Laurent Gatto lg390 at cam.ac.uk
Wed Mar 4 22:27:24 CET 2015


On  3 March 2015 06:07, Henrik Bengtsson wrote:

> Not that long ago DESCRIPTION field 'Additional_repositories' was
> introduced which the purpose of providing references to non-mainstream
> package repositories, e.g. R-Forge.  Interestingly, by "mainstream"
> they mean CRAN and Bioconductor.  The 'Additional_repositories' field
> is also enforced for CRAN depending on non-mainstream packages, where
> "depending" on can be any package under "Depends", "Imports",
> "Suggests" and (I guess), "LinkingTo" and "Enhances".

Thanks, Henrik!

If I understand well, Bioconductor is considered a mainstream repository
and so is not expected to be added as an Additional_repository (despite
the fact that install.packages does not install the Bioc repository by
default). The issues with doing so nevertheless would be that CRAN
maintainer might complaind and this would break the tied R/Bioc
versions.

Best wishes,

Laurent

> I bet that in a, hopefully, not too far future, we'll find that
> install.packages() will install from not only CRAN by default, but
> also Bioconductor and whatever Additional_repositories suggests.  As
> usual, the bet is about food and drinks in person whenever/whenever
> feasible.
>
>
> BTW, I have a few feature requests related to Bioc releases/versions:
>
> 1. Add release date to online announcement pages online, e.g.
> http://bioconductor.org/news/bioc_2_14_release/
>
>
> 2. A data.frame listing Bioc versions and their release dates (maybe
> even time stamps), e.g.
>
>> biocVersions()
> 1.0 2002-04-29
> ...
> 2.14 2014-10-14
> 3.0 2014-04-14
> 3.1 2015-04-17
>
>
> 3. As far as I understand it, the recommended Bioc version to use
> depends on R version and the date (in the past only R version).  I
> would like to have a function that returns the Bioc version as a
> function of R version and date.  Maybe BiocInstaller::biocVersion()
> could be extended with this feature, e.g.
>
> biocVersion <- function(date, rversion) {
>   ## Current?
>   if (missing(date) && missing(rversion)) return(BIOC_VERSION)
>
>   if (missing(date) date <- Sys.date()
>   date <- as.Date(date)
>   if (missing(rversion)) rversion <- getRversion()
>
>   ## Lookup by (rversion, date) from known releases
>   ## and make best guesses for the future (with a warning)
>   ...
> }
>
> If such a function could be available as a light-weight script online,
> then the proper Bioc repos could be "downloaded" by
> tools:::.BioC_version_associated_with_R_version(), cf. Martin's reply
> on lagging Bioc versions.  This would bring us one step closer to
> installing Bioc packages using install.packages(), cf. Laurent's
> original post. Because it may not be clear to an R user that they need
> to go to Bioconductor because a CRAN package depends on a Bioc
> package. That user might not even have heard of Bioconductor. Not
> suggesting biocLite() should be replaced, but the gap for using
> install.packages() could be made smaller.  ... and maybe one day we'll
> have an omnibus package installer/updater available in a fresh R
> installation.
>
> The above biocVersion() function would also be useful for figuring out
> what R/BioC version was in use at a certain year in the past (e.g.
> reproducing old work) and for finding out versions of Bioc
> release/devel packages back in time (e.g. if you try to be backward
> compatible).
>
> Thxs,
>
> Henrik
>
> On Mon, Mar 2, 2015 at 3:41 PM, Laurent Gatto <lg390 at cam.ac.uk> wrote:
>>
>> Thank you all for your answers.
>>
>> Laurent
>>
>> On  2 March 2015 23:27, Martin Morgan wrote:
>>
>>> On 03/02/2015 03:18 PM, Laurent Gatto wrote:
>>>>
>>>> Dear all,
>>>>
>>>>
>>>> I had never realised that CRAN packages that depended on Bioc packages
>>>> could actually not be installed with install.packages without setting a
>>>> repo or using BiocInstaller::bioLite. Here is an example using a fresh R
>>>> installation
>>>>
>>>>    http://cran.r-project.org/web/packages/MSeasy/index.html
>>>>    Depends: amap, clValid, cluster, fpc, mzR, xcms
>>>>
>>>> $ docker run --rm -ti rocker/r-base R
>>>>
>>>> R version 3.1.2 (2014-10-31) -- "Pumpkin Helmet"
>>>> Copyright (C) 2014 The R Foundation for Statistical Computing
>>>> Platform: x86_64-pc-linux-gnu (64-bit)
>>>>
>>>> R is free software and comes with ABSOLUTELY NO WARRANTY.
>>>> You are welcome to redistribute it under certain conditions.
>>>> Type 'license()' or 'licence()' for distribution details.
>>>>
>>>>    Natural language support but running in an English locale
>>>>
>>>> R is a collaborative project with many contributors.
>>>> Type 'contributors()' for more information and
>>>> 'citation()' on how to cite R or R packages in publications.
>>>>
>>>> Type 'demo()' for some demos, 'help()' for on-line help, or
>>>> 'help.start()' for an HTML browser interface to help.
>>>> Type 'q()' to quit R.
>>>>
>>>>> install.packages("MSeasy")
>>>> Installing package into ‘/usr/local/lib/R/site-library’
>>>> (as ‘lib’ is unspecified)
>>>> Warning: dependencies ‘mzR’, ‘xcms’ are not available
>>>> also installing the dependencies ‘modeltools’, ‘DEoptimR’, ‘mclust’, ‘flexmix’, ‘prabclus’, ‘diptest’, ‘mvtnorm’, ‘robustbase’, ‘kernlab’, ‘trimcluster’, ‘amap’, ‘clValid’, ‘fpc’
>>>>
>>>> [...]
>>>>
>>>> ERROR: dependencies ‘mzR’, ‘xcms’ are not available for package ‘MSeasy’
>>>> * removing ‘/usr/local/lib/R/site-library/MSeasy’
>>>>
>>>> The downloaded source packages are in
>>>>      ‘/tmp/Rtmp4T40ub/downloaded_packages’
>>>> Warning message:
>>>> In install.packages("MSeasy") :
>>>>    installation of package ‘MSeasy’ had non-zero exit status
>>>>
>>>> This does sound really counter-intuitive. Am I missing anything?
>>>
>>> biocLite("MSeasy") is easy and works.
>>>
>>> Otherwise yes, to install a Bioconductor package using install.packages()
>>> requires that you've selected (via chooseBioCmirror() or options("BioC_mirror"))
>>> or provided (e.g., install.packages("MSeasy",
>>> repos=BiocInstaller::biocinstallRepos()) a Bioconductor repository.
>>>
>>> Since the mirror choices provided by chooseBioCmirror() are hard-wired, users of
>>> R3.0.0 + chooseBioCmirror() will get an older version of Biocondcutor than users
>>> of 3.0.0 + biocLite().
>>>
>>> Martin
>>>
>>>>
>>>> Laurent
>>>>
>>>> _______________________________________________
>>>> Bioc-devel at r-project.org mailing list
>>>> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>>>>
>>
>> --
>> Laurent Gatto
>> http://cpu.sysbiol.cam.ac.uk/
>>
>> _______________________________________________
>> Bioc-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/bioc-devel

-- 
Laurent Gatto
http://cpu.sysbiol.cam.ac.uk/



More information about the Bioc-devel mailing list