On Wed, Mar 4, 2015 at 1:27 PM, Laurent Gatto <lg...@cam.ac.uk> wrote:
>
> 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

Correct, that's my interpretation too. I asked Kurt about this when
they announced it last year:

>> Q. What is a "mainstream" repository, e.g. do we have to list a
>> Bioconductor URL in 'Additional_repositories'?
>
>CRAN and BioC are mainstream

which implies you don't have to add it, because (from
http://cran.r-project.org/web/packages/policies.html) "Packages on
which a CRAN package depends **should be available from a mainstream
repository**: if any mentioned in ‘Suggests’ or ‘Enhances’ fields are
**not from such a repository**, where to obtain them at a repository
**should be specified in an ‘Additional_repositories’ field** of the
DESCRIPTION file (as a comma-separated list of repository URLs) or for
other means of access, described in the ‘Description’ field."'

Also, I have a few CRAN packages that relies on both Bioc and R-Forge
packages (e.g. http://cran.r-project.org/web/packages/aroma.core/) and
CRAN does not complain that I only specify:

Additional_repositories: http://r-forge.r-project.org

which is inline with my above interpretation.

BTW, in case someone cut'n'paste from here: 'Additional_repositories'
(not 'Additional_repository').

> (despite
> the fact that install.packages does not install the Bioc repository by
> default).

My interpretation on this is that by defining "mainstream" and adding
'Additional_repositories' it will as first move allow CRAN to automate
the installation of packages on the CRAN farm as far as possible
(except for the fallback to with manual instructions in the
'Description' field).  Hopefully, the next move is that automated
repository-lookup/forwarding becomes part of the default installation
machinery.  For CRAN and Bioc that shouldn't be too hard, particularly
since a package can no longer exist on both.  It's a bit more try to
decide what to install if a package is on CRAN but an "under
construction" version is available on R-Forge; I would go with CRAN
only for those cases, but it could become confusing, cf. "install from
source instead of old binary?"

> The issues with doing so nevertheless would be that CRAN
> maintainer might complaind and this would break the tied R/Bioc
> versions.

It feels like that should be possible to solve programmatically, as
long as the metadata is there (see my previous reply).

Cheers,

Henrik

>
> 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 <lg...@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@r-project.org mailing list
>>>>> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>>>>>
>>>
>>> --
>>> Laurent Gatto
>>> http://cpu.sysbiol.cam.ac.uk/
>>>
>>> _______________________________________________
>>> Bioc-devel@r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>
> --
> Laurent Gatto
> http://cpu.sysbiol.cam.ac.uk/

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

Reply via email to