The problem is in the piano package, which seems to want to do lots of fully qualified function calling, without trying to figure out where the functions come from. In loadMAdata
there is this bit:
if(nCelFiles > 0 & missing(dataNorm)) {
# Load CEL-files
.verb("Loading CEL files...", verbose)
dataRaw <- affy::ReadAffy(celfile.path=datadir, ...)
colnames(affy::exprs(dataRaw)) <- gsub("\\.CEL","",colnames(affy::exprs(dataRaw)), ignore.case=TRUE)
colnames(affy::exprs(dataRaw)) <- gsub("\\.gz","",colnames(affy::exprs(dataRaw)), ignore.case=TRUE)
if(sum(duplicated(colnames(affy::exprs(dataRaw)))) > 0) stop("found samples with identical names")
.verb("...done", verbose)
Where things like affy::exprs(dataRaw)
are trying to use a function from the affy package that isn't a function in the affy package:
> affy::exprs(Dilution) <- exprs(Dilution)
Error: 'exprs<-' is not an exported object from 'namespace:affy'
> Biobase::exprs(Dilution) <- exprs(Dilution)
But instead is a function defined in the Biobase package. Ideally the maintainer of this package is subscribed to this support site and will see this thread and fix the function. Failing that you can contact him directly using the email address found by
packageDescription("piano")$Main
Or better still, follow
packageDescription("piano")$BugReports
which giveshttps://github.com/varemo/piano/issues
It seems surprising to me that this error isn't picked up by
R CMD check
. I guess that's because the affy package does define methods for bothexprs
andexprs<-
? I suspect the piano package needs to importexprs<-
from Biobase in its NAMESPACE file, like it already importsexprs
.Thanks for the pointers, I will try to fix this as soon as possible. As I understand it
exprs
andexprs<-
are methods in affy. Currentlyexprs
is imported in the piano NAMESPACE from Biobase. I will addexprs<-
there as well. But should the function code also be altered so thataffy::
is replaced byBiobase::
in the examples above? I have difficulties understanding how to usepackagename::
in connection to methods vs functions.Leif, if you import the function in NAMESPACE, then you should not need a package qualifier at all when you use the function. So you shouldn't need
affy::
orBiobase::
.I agree that
R CMD check
should pick this up. I reported this on R’s Bugzilla: https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17613Another issue maybe is that the affy package defines
exprs
andexprs<-
methods but only exports the former. I changed this in affy 1.63.1.Anyway, as far as the piano package is concerned, I also agree that it should call the
exprs
andexprs<-
generics, which are both defined in the Biobase package. In my experience trying to call specific methods is not robust so calling the generic should be preferred.H.
FYI this
R CMD check
bug has been fixed in R-devel: https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17613Thanks all for the clarifications! Will implement asap.
This should now be fixed in piano version 2.1.3.