Question: Error: 'exprs<-' is not an exported object from 'namespace:affy'
0
gravatar for abolfazl.nikakhtar
4 weeks ago by
abolfazl.nikakhtar0 wrote:

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 • 110 views
ADD COMMENTlink modified 4 weeks ago by James W. MacDonald51k • written 4 weeks ago by abolfazl.nikakhtar0
Answer: Error: 'exprs<-' is not an exported object from 'namespace:affy'
3
gravatar for James W. MacDonald
4 weeks ago by
United States
James W. MacDonald51k wrote:

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 COMMENTlink written 4 weeks ago by James W. MacDonald51k

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 REPLYlink modified 4 weeks ago • written 4 weeks ago by Gordon Smyth38k

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 REPLYlink written 4 weeks ago by Leif Väremo70

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 REPLYlink written 4 weeks ago by Gordon Smyth38k

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 REPLYlink modified 4 weeks ago • written 4 weeks ago by Hervé Pagès ♦♦ 14k

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

ADD REPLYlink written 16 days ago by Hervé Pagès ♦♦ 14k

Thanks all for the clarifications! Will implement asap.

ADD REPLYlink written 4 weeks ago by Leif Väremo70

This should now be fixed in piano version 2.1.3.

ADD REPLYlink written 10 days ago by Leif Väremo70
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 185 users visited in the last hour