[R] Please help....normalization by the median of some control genes

Rui Barradas ruipbarradas at sapo.pt
Thu Aug 23 19:51:01 CEST 2012


Hello,

I'm not sure I understand what you want. You want the medians to be 
"similar"? Why not equal?
(The code below assumes ids represent genes.)


d <- read.table(text="
         id1    id2    id3
control1    0.8    0.7    0.6
control2    0.6    0.2    0.4
probe1        0.3    0.2    0.5
probe2        0.4    0.9    0.7
probe3        0.6    0.7    0.4
", header=TRUE)
d

d.new <- sapply(d, function(x) x - median(x))

The medians are now all equal to zero.

Hope this helps,

Rui Barradas

Em 23-08-2012 13:37, David Lyon escreveu:
> Can someone show me some code to do normalization by the median of some control genes for the example below?
>
> Many Many Thanks in advance
>
>
>
> This strategy selects a subset of genes (called “control genes”) and makes the median of their data distribution similar across arrays.
>
>          id1    id2    id3
> control1    0.8    0.7    0.6
> control2    0.6    0.2    0.4
> probe1        0.3    0.2    0.5
> probe2        0.4    0.9    0.7
> probe3        0.6    0.7    0.4
>
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list