[BioC] Problem following monograph directions in Chapter 4
Kasper Daniel Hansen
khansen at stat.berkeley.edu
Wed Sep 10 22:29:58 CEST 2008
On Sep 10, 2008, at 12:25 PM, McGee, Monnie wrote:
> Dear Robert,
>
> I am using R 2.7.2 with marray 1.18 (and BioC 1.18). I ran
> Sys.locale and found the following:
>
>> Sys.getlocale()
> [1] "en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8"
> Then I set the Sys.locale to "C", as suggested.
>> Sys.setlocale(locale = "C")
> [1] "C/C/C/C/C/en_US.UTF-8"
>
> This solved the problem with the read.GenePix function. However,
> the problem with the graphics device still remains. Here is the
> code and the errors I received:
>
>> library(beta7)
>> maQualityPlots(beta7)
> Error in X11(paste("png::", filename, sep = ""), width, height,
> pointsize, :
> unable to start device PNG
> In addition: Warning message:
> In png(filename = "diagPlot.6Hs.195.1.png", width = 1600, height =
> 1200, :
> unable to open connection to X11 display ''
>
>> maQualityPlots(beta7,dev="jpeg")
> Error in X11(paste("jpeg::", quality, ":", filename, sep = ""),
> width, :
> unable to start device JPEG
> In addition: Warning message:
> In jpeg(filename = "diagPlot.6Hs.195.1.jpeg", width = 1600, height =
> 1200, :
> unable to open connection to X11 display ''
>
>> maQualityPlots(beta7,dev="ps")
> [1] "Format error, format will be set to PNG"
> Error in X11(paste("png::", filename, sep = ""), width, height,
> pointsize, :
> unable to start device PNG
> In addition: Warning message:
> In png(filename = "diagPlot.6Hs.195.1.png", width = 1600, height =
> 1200, :
> unable to open connection to X11 display ''
>
> This happened while I was using R.app GUI 1.25 (5217). When I
> opened an X11 window on my computer and tried the same code, it
> worked. For some reason, R.app cannot open .png. .jpeg. or .ps. Is
> there a fix for this?
>
Click on the X11 icon inside R.app, that will start X11. You need to
have X11 running to do jpeg or png (although that has recently changed
in a way to has not been incorporated into maQualityPlots.
Kasper
> Thanks,
> Monnie
>
> Monnie McGee, Ph.D.
> Associate Professor
> Department of Statistical Science
> Southern Methodist University
> Ph: 214-768-2462
> Fax: 214-768-4035
>
>
>
> -----Original Message-----
> From: Robert Gentleman [mailto:rgentlem at fhcrc.org]
> Sent: Tue 9/9/2008 5:34 PM
> To: McGee, Monnie
> Cc: bioconductor at stat.math.ethz.ch
> Subject: Re: [BioC] Problem following monograph directions in
> Chapter 4
>
> Hi Monnie,
>
> What you did not tell us is your sessionInfo(), so we don't know what
> version of R/BioC you are using. If it is not 2.7.2 and 1.18.0 for
> marray then you should update, and then ask.
>
> the other issue is that you have your locale set to something other
> than
> C (and sometimes it is just easier to set it to C)
>
> you can find out by looking at
> Sys.getlocale
> and set using Sys.setlocale
>
> and then those errors would most likely go away
>
> best wishes
> Robert
>
>
> McGee, Monnie wrote:
>> Hello, All,
>>
>> First of all, I'm using R 2.7.2 with the latest version of BioC (I
>> just downloaded everything last Friday). My machine is a 4 by
>> 2.5 GHz PowerPC G5 running Mac OS 10.4.11.
>>
>> I am following the code in the monograph (and on the monograph
>> website) to work through Chapter 4 of the monograph: Preprocessing
>> Two-Color Arrays. I realize that R has gone through several
>> versions since the text was printed. I think that my problems stem
>> from using outdated code.
>>
>> My first question is about the error in the line "mraw =
>> read.GenePix(files,name.Gb=NULL,name.Rb=NULL)". It says that
>> "input string 32 is invalid". My second question is about the
>> error when using maQualityPlots (last line of code below).
>>
>>
>> The following is the code I typed and the output:
>>> datadir = system.file("beta7",package="beta7")
>>> TargetInfo = read.marrayInfo(file.path(datadir,"TargetBeta7.txt"))
>>> TargetInfo at maNotes = "Files were loaded from beta7 package."
>>> TargetInfo
>> An object of class "marrayInfo"
>> @maLabels
>> [1] "6Hs.195.1.gpr" "6Hs.168.gpr" "6Hs.166.gpr"
>> [4] "6Hs.187.1.gpr" "6Hs.194.gpr" "6Hs.243.1.gpr"
>>
>> @maInfo
>> FileNames SubjectID Cy3 Cy5 Date of Blood Draw
>> 1 6Hs.195.1.gpr 1 b7 - b7 + 2002.10.11
>> 2 6Hs.168.gpr 3 b7 + b7 - 2003.01.16
>> 3 6Hs.166.gpr 4 b7 + b7 - 2003.01.16
>> 4 6Hs.187.1.gpr 6 b7 - b7 + 2002.09.16
>> 5 6Hs.194.gpr 8 b7 - b7 + 2002.09.18
>> 6 6Hs.243.1.gpr 11 b7 + b7 - 2003.01.13
>> Date of Scan
>> 1 2003.07.25
>> 2 2003.08.07
>> 3 2003.08.07
>> 4 2003.07.18
>> 5 2003.07.25
>> 6 2003.08.06
>>
>> @maNotes
>> [1] "Files were loaded from beta7 package."
>>
>>> galinfo = read.Galfile("6Hs.166.gpr",path=datadir)
>> Error in if (skip > 0) readLines(file, skip) :
>> missing value where TRUE/FALSE needed
>> In addition: Warning messages:
>> 1: In grep(layout.id[1], y) : input string 32 is invalid in this
>> locale
>> 2: In grep(info.id[1], y) : input string 32 is invalid in this locale
>>> oldwd = getwd()
>>> setwd(datadir)
>>> files = c("6Hs.166.gpr","6Hs.187.1.gpr")
>>> mraw = read.GenePix(files,name.Gb=NULL,name.Rb=NULL)
>> Error in if (skip > 0) readLines(file, skip) :
>> missing value where TRUE/FALSE needed
>> In addition: Warning messages:
>> 1: In grep(layout.id[1], y) : input string 32 is invalid in this
>> locale
>> 2: In grep(info.id[1], y) : input string 32 is invalid in this locale
>>> library("beta7")
>>> checkTargetInfo(beta7)
>> [1] TRUE
>>> maGeneTable(beta7)[1:4,1:5]
>> Grid.R Grid.C Spot.R Spot.C ID
>> H200000297 1 1 1 1 H200000297
>> H200000303 1 1 1 2 H200000303
>> H200000321 1 1 1 3 H200000321
>> H200000327 1 1 1 4 H200000327
>>> beta7nbg = beta7
>>> beta7nbg at maGb = beta7nbg at maRb = 0 * beta7nbg at maRb
>>> beta7sub = beta7[1:100,2:3]
>>> maQualityPlots(beta7)
>> Error in X11(paste("png::", filename, sep = ""), width, height,
>> pointsize, :
>> unable to start device PNG
>> In addition: Warning message:
>> In png(filename = "diagPlot.6Hs.195.1.png", width = 1600, height =
>> 1200, :
>> unable to open connection to X11 display ''
>>
>> I also tried the following section of code from page 67 of the
>> monograph with the same results:
>>
>>> library(arrayQuality)
>>> TargetInfo = read.marrayInfo("TargetBeta7.txt")
>>> mraw = read.GenePix(targets = TargetInfo)
>> Error in if (skip > 0) readLines(file, skip) :
>> missing value where TRUE/FALSE needed
>> In addition: Warning messages:
>> 1: In grep(layout.id[1], y) : input string 32 is invalid in this
>> locale
>> 2: In grep(info.id[1], y) : input string 32 is invalid in this locale
>>> maQualityPlots(mraw)
>> Error in as.vector(x) : object "mraw" not found
>>> TargetInfo
>> An object of class "marrayInfo"
>> @maLabels
>> [1] "6Hs.195.1.gpr" "6Hs.168.gpr" "6Hs.166.gpr"
>> [4] "6Hs.187.1.gpr" "6Hs.194.gpr" "6Hs.243.1.gpr"
>>
>> @maInfo
>> FileNames SubjectID Cy3 Cy5 Date of Blood Draw
>> 1 6Hs.195.1.gpr 1 b7 - b7 + 2002.10.11
>> 2 6Hs.168.gpr 3 b7 + b7 - 2003.01.16
>> 3 6Hs.166.gpr 4 b7 + b7 - 2003.01.16
>> 4 6Hs.187.1.gpr 6 b7 - b7 + 2002.09.16
>> 5 6Hs.194.gpr 8 b7 - b7 + 2002.09.18
>> 6 6Hs.243.1.gpr 11 b7 + b7 - 2003.01.13
>> Date of Scan
>> 1 2003.07.25
>> 2 2003.08.07
>> 3 2003.08.07
>> 4 2003.07.18
>> 5 2003.07.25
>> 6 2003.08.06
>>
>> @maNotes
>> [1] "TargetBeta7.txt"
>>
>>
>> Thanks for your help!
>>
>> Monnie McGee, Ph.D.
>> Associate Professor
>> Department of Statistical Science
>> Southern Methodist University
>> Ph: 214-768-2462
>> Fax: 214-768-4035
>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> 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
>
> --
> Robert Gentleman, PhD
> Program in Computational Biology
> Division of Public Health Sciences
> Fred Hutchinson Cancer Research Center
> 1100 Fairview Ave. N, M2-B876
> PO Box 19024
> Seattle, Washington 98109-1024
> 206-667-7700
> rgentlem at fhcrc.org
>
> _______________________________________________
> 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
More information about the Bioconductor
mailing list