[BioC] affyPLM - cant plot chip pseudo image

Rebecca tagett at ipsogen.com
Mon Jul 16 18:52:10 CEST 2007


Thank you James,
Yes, I did use BiocLite to install and got the same results as you for the
"showMethods". 
However, after carefully retracing my steps, I now know what I did that
caused the error, but no idea why, or how to fix it. 

What I did that caused the error was that I put the following line at the
end of the file "Rprofile.site" in the "~\R-2.5.1\etc" directory 

	source(file.path(R.home(), "etc", "myRcode.R"))

Where "myRcode.R" is some code I wrote for an application in R/BioC,
including the PLMset manipulations. It is in "~\R-2.5.1\etc", next to
"Rprofile.site".

I put that line in "Rprofile.site" because I would like to be able to
double-click on the R desktop icon and have R go to the correct directory
and source the script. In other words, I don't want to have to change the
working directory and source the code. 

Now when I double click my desk top icon, I get the desired behavior, and my
home made functions are working except the pseudo image creation from the
PLMset. As you suggest, it would seem that I am not getting the correct
method for the PLMset object. 

I noticed that there are two files called "image.R" - one in
library\graphics and the other in library\marray. It must be defaulting to
the CRAN one and not the BioC one. But in that case, why would showMethods()
give the following ? 
	> aBat <- ReadAffy()
	> Pset <- fitPLM(aBat)
	> image(Pset, which =2)
	Erreur dans image.default(Pset, which = 2) : argument must be
matrix-like
	> showMethods("image", class="PLMset")
	Function: image (package graphics)
	x="PLMset"

If you have any advise on how I can get my application to behave correctly,
I'd really appreciate it. (Rename the BioC version of image.R to something
unique?)

Thanks again for your kind help.

> sessionInfo()
R version 2.5.1 (2007-06-27) 
i386-pc-mingw32 

locale:
LC_COLLATE=French_France.1252;LC_CTYPE=French_France.1252;LC_MONETARY=French
_France.1252;LC_NUMERIC=C;LC_TIME=French_France.1252

attached base packages:
[1] "grDevices" "datasets"  "splines"   "graphics"  "stats"     "utils"
"tools"     "methods"   "base"     

other attached packages:
mouse4302cdf RColorBrewer      affyPLM        gcrma  matchprobes
affydata   simpleaffy   genefilter     survival         affy 
    "1.16.0"      "0.2-3"     "1.12.0"      "2.8.1"      "1.8.1"
"1.11.2"    "2.10.31"     "1.14.1"       "2.32"     "1.14.2" 
      affyio      Biobase 
     "1.4.1"     "1.14.1"




-----Message d'origine-----
De : James W. MacDonald [mailto:jmacdon at med.umich.edu] 
Envoyé : lundi 16 juillet 2007 15:17
À : Rebecca
Cc : bioconductor at stat.math.ethz.ch
Objet : Re: [BioC] affyPLM - cant plot chip pseudo image

Hi Rebecca,

Rebecca wrote:
> Hello,
> I have some R/BioC code that was working and is not working any more, and
I
> suspect that it has to do with the fact that I did a global "update
> packages". The error comes from trying to create a pseudo image of a CEL
> file which is part of an Affy batch, exactly as is done in the vignette
> "affyPLM: Model Based QC Assessment of Affymetrix".
>
>   
>> aBatRef <- ReadAffy()
>> Pset <- fitPLM(aBatRef)
>> image(Pset, which =2)
>>     
>
> Erreur dans image.default(Pset) : argument must be matrix-like
>   

This error indicates that you are not getting the correct method for 
your PLMset object, which indicates some problem with your installation. 
If you load the affyPLM package and type

showMethods("image", class="PLMset")

do you get this?

 > showMethods("image", class="PLMset")
Function: image (package graphics)
x="PLMset"




>
> I found a similar problem in the BioC help archives and the asker was
> advised to reinstall R, BioC , and all packages. 
> So I reinstalled everything with the latest stable versions of R and BioC
> and I still get the error.
>   

How did you re-install? Did you use biocLite() directly, or did you do 
an update.packages()?

Best,

Jim


> Looking in the source code for image.R, I see that his particular error is
> reported when the dimensions of the objet received are null, and indeed
that
> is the case: 
>
>   
>> dim(Pset)
>>     
> NULL
>
>   
>> class(Pset)
>>     
> [1] "PLMset"
> attr(,"package")
> [1] "affyPLM"
>  
> So I tried to use the "Dilution" data set as described in the vignette
> "affyPLM: Model Based QC Assessment of Affymetrix" (April 25, 2007). The
> only change in the last year to the vignette (with respect to creation of
> the pseudo image) is the use of "updateObject"
>
> library(affyPLM)
> data(Dilution)
> Dilution = updateObject(Dilution)
> Pset <- fitPLM(Dilution)
> image(Pset, which = 2)
>
> The "Dilution" data set also results in the same error, so I thought that
I
> would report it to you !  Do you reproduce this ???
>
> Also, in the fitPLM vignette, the examples were "not run" (I have never
seen
> that before :) 
> 	Examples
> 	data(affybatch.example)
> 	Pset <- fitPLM(affybatch.example,model=PM ~ -1 + probes + samples)
> 	se(Pset)[1:5,]
>
> 	# A larger example testing weight image function
> 	data(Dilution)
> 	## Not run: Pset <- fitPLM(Dilution,model=PM ~ -1 + probes +
> samples)
> 	## Not run: image(Pset)
> 	## Not run: NUSE(Pset) # NUSE
>
>  
> Thanks for your help.
> PS - I also tried this : image(Pset at residualSE). I get an image but it is
> definitely NOT what I was expecting!
>
>
>   
>> sessionInfo()
>>     
> R version 2.5.1 (2007-06-27) 
> i386-pc-mingw32 
>
> locale:
>
LC_COLLATE=French_France.1252;LC_CTYPE=French_France.1252;LC_MONETARY=French
> _France.1252;LC_NUMERIC=C;LC_TIME=French_France.1252
>
> attached base packages:
> [1] "grDevices" "datasets"  "splines"   "graphics"  "stats"     "utils"
> "tools"     "methods"   "base"     
>
> other attached packages:
>  hgu95av2cdf mouse4302cdf RColorBrewer      affyPLM        gcrma
> matchprobes     affydata   simpleaffy   genefilter     survival 
>     "1.16.0"     "1.16.0"      "0.2-3"     "1.12.0"      "2.8.1"
> "1.8.1"     "1.11.2"    "2.10.31"     "1.14.1"       "2.32" 
>         affy       affyio      Biobase 
>     "1.14.2"      "1.4.1"     "1.14.1"
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives:
http://news.gmane.org/gmane.science.biology.informatics.conductor
>   



**********************************************************
Electronic Mail is not secure, may not be read every day, and should not be
used for urgent or sensitive issues.



More information about the Bioconductor mailing list