[BioC] affyPLM - cant plot chip pseudo image

Rebecca tagett at ipsogen.com
Tue Jul 17 12:15:14 CEST 2007


Hello, thanks for your response.



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

Rebecca wrote:
> 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"))
>   

What is in myRcode.R? Specifically, is there anything in there that 
might affect the class of the PLMset you are producing? What do you get 
from class(Pset)?


I have whittled down the code in "myRcode.R" to one line :
"library(affyPLM)".

If I source "myRcode.R" by hand, with no changes to "Rprofile.site", I have
no trouble making a pseudo image from my saved PLM set.

If I add the line
		source(file.path(R.home(), "etc", "myRcode.R")))
to the bottom of "Rprofile.site", and open the R GUI from the desktop,
pseudo image no longer works.

I include gory details of the tests (1,2, and 3) that show this down below.

Maybe the key is in the fact that the two different ways of sourcing
"myRcode.R" print different traces to the GUI.

#------------------------------------------
### WHEN I SOURCE BY HAND, I GET THE FOLLOWING 
# AND PSEUDO IMAGE CREATION WORKS
> source("myRcode.R")
Le chargement a nécessité le package : affy
Le chargement a nécessité le package : Biobase
Le chargement a nécessité le package : tools

Welcome to Bioconductor

  Vignettes contain introductory material. To view, type
  'openVignette()'. To cite Bioconductor, see
  'citation("Biobase")' and for packages 'citation(pkgname)'.

Le chargement a nécessité le package : affyio
Le chargement a nécessité le package : affydata
Le chargement a nécessité le package : gcrma
Le chargement a nécessité le package : matchprobes
Le chargement a nécessité le package : splines




#-----------------------------------
# WHEN OPENING R FROM THE DESKTOP, WITH "myRcode.R" SOURCED INSIDE 
# "Rprofile.site", THE FOLLOWING MESSAGES APPEAR IN THE GUI. 
# AND PSEUDO IMAGE CREATION DOES NOT WORK

Le chargement a nécessité le package : Biobase
Le chargement a nécessité le package : tools
Le chargement a nécessité le package : utils

Welcome to Bioconductor

  Vignettes contain introductory material. To view, type
  'openVignette()'. To cite Bioconductor, see
  'citation("Biobase")' and for packages 'citation(pkgname)'.

Le chargement a nécessité le package : affyio
Le chargement a nécessité le package : affydata
Le chargement a nécessité le package : gcrma
Le chargement a nécessité le package : matchprobes
Le chargement a nécessité le package : splines
Le chargement a nécessité le package : stats

Attachement du package : 'stats'


        The following object(s) are masked from package:affy :

         update 

#----------------------------------
# If I add the line "library(stats)" above "library(afftPLM)" 
# in "myRcode.R", The introductory message is cleaner, 
# but the pseudo image creation still fails.



Le chargement a nécessité le package : affy
Le chargement a nécessité le package : Biobase
Le chargement a nécessité le package : tools
Le chargement a nécessité le package : utils

Welcome to Bioconductor

  Vignettes contain introductory material. To view, type
  'openVignette()'. To cite Bioconductor, see
  'citation("Biobase")' and for packages 'citation(pkgname)'.

Le chargement a nécessité le package : affyio
Le chargement a nécessité le package : affydata
Le chargement a nécessité le package : gcrma
Le chargement a nécessité le package : matchprobes
Le chargement a nécessité le package : splines

> dir()
[1] "Makeconf"      "myRcode.R"     "Pset.Rdata"    "Rconsole"      "Rdevga"
"repositories" 
[7] "rgb.txt"       "Rprofile.site"

> load("Pset.Rdata")		# This is a saved PLMset which loads and 
					# makes pseudo images OK (see below)
> 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"

> class(Pset)
[1] "PLMset"
attr(,"package")
[1] "affyPLM"

#######################  GORY DEBUG DETAILS ############################
I created an affy batch with 2 CEL files (aBat <- ReadAffy()). 
Then I created a PLMset (Pset <- fitPLM(aBat)) and saved it for testing
(file "Pset.Rdata").
Moved the file "Pset.Rdata" to "\R-2.5.1\etc". NO CHANGES to original
"Rprofile.site".

1- Open R 2.5.1 by double clicking desk top icon, go to "\R-2.5.1\etc". Load
"Pset.Rdata".
Verify that the pseudo image works.

	> dir()		
	[1] "Makeconf"      "myRcode.R"     "Pset.Rdata"    "Rconsole"     
	[5] "Rdevga"        "repositories"  "rgb.txt"       "Rprofile.site"
	> library(affyPLM)
	> load("Pset.Rdata")
	> class(Pset)
	[1] "PLMset"
	attr(,"package")
	[1] "affyPLM"
	> image(Pset, which =2)		# THIS WORKS
	>q("no")


2- Put command for loading library affyPLM in "myRcode.R", located in
"\R-2.5.1\etc".  Still no changes to "Rprofile.site".
	--------------------------
	###   "myRcode.R" contains this line only:
	
	library(affyPLM)
	
	---------------------------
Open R 2.5.1 by double clicking desk top icon, go to "\R-2.5.1\etc". 
Source the little script and verify that the pseudo image works.
	> dir()
	[1] "Makeconf"      "myRcode.R"     "Pset.Rdata"    "Rconsole"     
	[5] "Rdevga"        "repositories"  "rgb.txt"       "Rprofile.site"
	> source("myRcode.R")
	
	> load("Pset.Rdata")
	> image(Pset, which =2)		# THIS WORKS
	>q("no")


3- Make changes to "Rprofile.site".
	---------------------------
	### "Rprofile.site" was edited to include these lines at the end
 	source(file.path(R.home(), "etc", "myRcode.R"))
	---------------------------
Open R 2.5.1 by double clicking desk top icon, go to "\R-2.5.1\etc". 

	> dir()
	[1] "Makeconf"      "myRcode.R"     "Pset.Rdata"    "Rconsole"     
	[5] "Rdevga"        "repositories"  "rgb.txt"       "Rprofile.site"
	> load("Pset.Rdata")
	> image(Pset, which =2)
	Erreur dans image.default(Pset, which = 2) : argument must be
matrix-like



More information about the Bioconductor mailing list