The first part for reading in the dataset is fine, like this:
>library("arrayQuality") >ArrayInfo <- read.marrayInfo("targetBeta7.txt") >rawdata <- read.GenePix(target=ArrayInfo) | 1) Loading the external package first 2) Read array layout into the customer variable "ArrayInfo" 3) Read in the raw data |
then we can get MA plots as PNG or JPEG format,
>maQualityPlots(rawdata, dev="png") | Either output as PNG or JPEG format |
However, we can't get the output as postscript format expect some error messages,
> maQualityPlots(rawdata, dev="ps") | Basically, dev="ps" is not a right parameter in R 2.5.1 under win32. We checked the code for maQualityPlots(), and it actually recognizes "postscript". |
We checked the manual for maQualityPlots (said nothing) and frame(), and found out frame() is an alias for plot.new(). Then we searched the R-help/discussion group, and it showed there are lots of such problems existed for plot.new() or frame() about "figure margins too large", and it said this problem came from the too small margins or too big/complicated figures, for example, too many points or lines.
People suggested to re-set the margins to resolve this problem. So first we check the margin set for postscript,
>ps.options() | it surprised us that both width and height are "ZERO". |
However, after setting up the width and height, maQualityPlots still showed the error "Error in frame() : figure margins too large". Next we approached the issue by decreasing the margins.
>mai=c(0.2,0.2,0.2,0.2) >mar=c(1,1,1,1) >par() . . $mai [1] 0.612 0.492 0.492 0.252 $mar [1] 5.1 4.1 4.1 2.1 . . >par(mai=c(0.2,0.2,0.2,0.2),mar=c(1,1,1,1)) | After all, we still can't get the right results. It still showed "Error in frame() : figure margins too large"! |
No comments:
Post a Comment