[R] [Q] raw -> gpr in aroma package

Henrik Bengtsson hb at maths.lth.se
Tue Jun 8 10:47:49 CEST 2004


Hi. 

First, I think you should address questions about aroma directly to me (the
author) instead of the r-help list since it is not a "core" R package.

To answer you question, you can not make a GenePixData object out of a
RawData object because the latter contains much less information than a
minimum GPR file would require. However, you can given an existing
GenePixData object overwrite/modify or add fields to it. But, before
explaining how you can do it you should be aware that modifying an existing
GPR structure will make some of the data inconsistent and this may (or may
not) confuse the GenePix software. Adding fields may as well confuse
GenePix.

Easiest is if you modify an existing field:

gpr[["F532 Median"]] <- raw2$G
gpr[["F635 Median"]] <- raw2$R

To find existing fields do ll(gpr).

To add new fields you also have to updated the internal/private .fieldNames
field, which is not recommended:
gpr$R <- raw2$R
gpr$G <- raw2$G
gpr$.fieldNames <- c(gpr$.fieldNames, c("R","G"))

You write a GenePixData object to file by

write(gpr, "result.gpr")

Aroma will update the GenePix header so it follows the correct GPR file
format. Some people have reported that GenePix requires the header elements
to come in a pre-defined order. Currently aroma does not take care of this
and it might be that you will experience problems. As a last resort you can
always append fields manually in, say, Excel. If you do so, do not forget to
update the ATF header from, say
ATF	 1.0 
24	43
to
ATF	 1.0 
24	45
where "43" and "45" is the number of fields/columns.

But again, I'm not convinced that you should edit GPR files yourself.

Cheers

Henrik Bengtsson
http://www.braju.com/R/

-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of ÁøÈñÁ¤
Sent: Tuesday, June 08, 2004 4:24 AM
To: r-help at stat.math.ethz.ch
Cc: 'junmyungjae'
Subject: [R] [Q] raw -> gpr in aroma package


Hi.
 
Is it possible to make gpr from raw?
 
library(aroma)
#read gpr file
gpr <- GenePixData$read("gpr123.gpr", path=aroma$dataPath)
# gpr -> raw
raw <- as.RawData(gpr)
# raw -> ma
ma <- getSignal(raw, bgSubtract=FALSE)
ma.norm <- clone(ma)
#normalization
normalizeWithinSlide(ma.norm, "s")
#ma -> raw
raw2 <- as.RawData(ma)
 
I want to make gpr data from raw2 and then I want to write new gpr(
write(gpr,"result.gpr")). Is it possible? Can anyone help me with this?
 
Thanks,
 
Hee-Jeong Jin.

	[[alternative HTML version deleted]]

______________________________________________
R-help at stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html




More information about the R-help mailing list