sgibb / MALDIquant

Quantitative Analysis of Mass Spectrometry Data
https://strimmerlab.github.io/software/maldiquant/
60 stars 25 forks source link

ProtGenerics #46

Closed lgatto closed 9 years ago

lgatto commented 9 years ago

Would you consider depending on ProtGenerics and use the mass and intensity generics that are defined there? They are defined as follows

setGeneric("intensity", function(object, ...) standardGeneric("intensity"))
setGeneric("mass", function(object, ...) standardGeneric("mass"))
sgibb commented 9 years ago

Thanks for creating the ProtGenerics package. In principle I am happy to depend on ProtGenerics but in that case I have to move MALDIquant to bioc. IMHO install.packages("MALDIquant") will fail if it depends on ProtGenerics. The user has to set the repository or has to use biocLite.

Are there any experiences with moving packages from CRAN to bioc? I don't want to have MALDIquant offline (neither in the recent bioc nor on CRAN) for more than a few days. In an ideal world it could live on CRAN until the newest version of bioc is released. But in that case it must be allowed that two MALDIquant packages with the same name exists on CRAN and bioc devel.

I have to think about it a little bit (I know we discussed the movement nearly a year ago, you said 'MALDIquant should join its friends on bioc.') and maybe I have to ask on rdevel/bioc-devel how to do a smooth transition.

lgatto commented 9 years ago

CRAN packages can depend on Bioconductor packages, of course. See for example protViz that depends on BiocGenerics.

FYI, there can't be two packages (or a single one) with the same name on CRAN and Bioconductor. If you wanted that, you could submit MALDIquant to Bioconductor and, once accepted, it would need to be removed from CRAN.

sgibb commented 9 years ago

CRAN packages can depend on Bioconductor packages, of course. See for example protViz that depends on BiocGenerics.

protViz doesn't depend on BiocGenerics but Suggests it (BTW I can't see why they are doing this, they never load the package). If I want to install the package via install.packages including all suggested packages, I get the following:

install.packages("protViz", dependencies="Suggests")
# ...
Warning: dependency ‘BiocGenerics’ is not available

I assume if a package Depends on a bioc package install.packages will fail completely (I know that I can set a different repo but no R beginner know/could do this).

FYI, there can't be two packages (or a single one) with the same name on CRAN and Bioconductor. If you wanted that, you could submit MALDIquant to Bioconductor and, once accepted, it would need to be removed from CRAN.

That means I would submit MALDIquant until the 27th of March (new package submission deadline). It may be accepted and has to be removed from CRAN. So it would be unavaiable from the 27th of March (or a few days later) till the 17th of April?!

lgatto commented 9 years ago

protViz doesn't depend on BiocGenerics but Suggests it

Yes, sorry, see here then, for another example.

But I am really surprised by the warning you show. I guess I never had this issue as I probably have all the Bioconductor packages installed. It does not make sense... the above package doesn't install on a fresh R using install.packages!

I assume if a package Depends on a bioc package install.packages will fail completely (I know that I can set a different repo but no R beginner know/could do this).

Asking people to set different repositories is not an option, indeed.

So it would be unavaiable from the 27th of March (or a few days later) till the 17th of April?!

It would be available using biocLite, but on a devel environment, I suppose.

It does make sense for you not to move it to Bioconductor, to keep the CRAN reference cited in the paper. But this installation issue is not an option. One can install CRAN packages with biocLite, but this seems a bit counter-intuitive for a new user. I will send an email on Bioc-devel to ask for a clarification.

lgatto commented 9 years ago

See the thread on bioc-devel.

I have changed the import(MALDIquant) to importFrom(MALDIquant, isEmpty) in MSnbase to get rid of this warning

* checking whether package ‘MSnbase’ can be installed ... WARNING
Found the following significant warnings:
  Warning: multiple methods tables found for ‘intensity’
  Warning: replacing previous import by ‘MALDIquant::intensity’ when loading ‘MSnbase’
  Warning: replacing previous import by ‘MALDIquant::mass’ when loading ‘MSnbase’
sgibb commented 9 years ago

Thanks for asking on bioc-devel. MALDIquant will stay on CRAN and won't depend on ProtGenerics for now. Nevertheless I am going to change my generics from setGeneric("intensity", function(object) standardGeneric("intensity")) to setGeneric("intensity", function(object, ...) standardGeneric("intensity")) to provide the same generics as ProtGenerics.

lgatto commented 9 years ago

That's great, thanks. There is also mass, by the way.