Error: 'exprs<-' is not an exported object from 'namespace:affy'
1
0
Entering edit mode
@abolfazlnikakhtar-21925
Last seen 4.0 years ago

hello I was just doing my project everything was OK but i encounter an horrendous error

Error: 'exprs<-' is not an exported object from 'namespace:affy'

what shoud I do? my code is

data=loadMAdata(setup ="targets.txt",annotation = "Annotation.txt",normalization = "plier"
           ,datadir = "C:/Users/98912/Desktop/CML")
#normalization="plier","mas5'"RMA" 

I don't know what is wrong with it ,

affy limma piano • 3.1k views
ADD COMMENT
3
Entering edit mode
@james-w-macdonald-5106
Last seen 15 hours ago
United States

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

ADD COMMENT
0
Entering edit mode

Or better still, follow packageDescription("piano")$BugReports which gives

https://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 both exprs and exprs<-? I suspect the piano package needs to import exprs<- from Biobase in its NAMESPACE file, like it already imports exprs.

ADD REPLY
0
Entering edit mode

Thanks for the pointers, I will try to fix this as soon as possible. As I understand it exprs and exprs<- are methods in affy. Currently exprs is imported in the piano NAMESPACE from Biobase. I will add exprs<- there as well. But should the function code also be altered so that affy:: is replaced by Biobase:: in the examples above? I have difficulties understanding how to use packagename:: in connection to methods vs functions.

ADD REPLY
0
Entering edit mode

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:: or Biobase::.

ADD REPLY
0
Entering edit mode

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=17613

Another issue maybe is that the affy package defines exprs and exprs<- 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 and exprs<- 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.

ADD REPLY
0
Entering edit mode

FYI this R CMD check bug has been fixed in R-devel: https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17613

ADD REPLY
0
Entering edit mode

Thanks all for the clarifications! Will implement asap.

ADD REPLY
0
Entering edit mode

This should now be fixed in piano version 2.1.3.

ADD REPLY

Login before adding your answer.

Traffic: 562 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6