[BioC] diff (Beginner's question)
Adaikalavan RAMASAMY
ramasamya at gis.a-star.edu.sg
Tue Nov 25 20:23:14 MET 2003
3rd line of the "Value" section of help(diff) :
" If x is a matrix then the difference operations are carried out on
each column separately. "
i.e. the difference returned as c( row2 -row1, row3 - row2, row4 - row3,
... ) and naturally row_(n+1) - row_n is undefined as there is no
row_(n+1), thus the resulting data will have one less row than the
original one.
If you use diff(exprs(x)), then you are calculating difference between
consecutive genes which does not have any meaning.
Try diff( t( exprs(x) ) ) or simply (x)[,1] - exprs(x)[,2].
--
Adaikalavan Ramasamy
-----Original Message-----
From: bioconductor-bounces at stat.math.ethz.ch
[mailto:bioconductor-bounces at stat.math.ethz.ch] On Behalf Of peter
robinson
Sent: Wednesday, November 26, 2003 9:07 AM
To: bioconductor at stat.math.ethz.ch
Subject: [BioC] diff (Beginner's question)
Dear all,
I have analyzed one data with (8 arrays of 4 wildtype and 4 ko) set
basically
according to the methods outlined in the End2Endlab vignette. The
analysis
includes a function:
scores <- esApply(eset,1,function(x) {
tmp <- t.test(x[index2],x[index1],var.equal=T)
c(mean(tmp$estimate),-diff(tmp$estimate),tmp$statistic,
tmp$p.value)
})
I would like to compare this with another dataset with one array each
(pooled
RNAs) wt vs ko (for a related gene being knocked out).
I used the rma function to produce an eset of the second dataset, and
then
tried to use
e <- -diff(exprs(eset2))
in order to produce the average log ratio for the second dataset with
the
intention of adding it to "scores" as follows:
scores2 <- cbind(scores,e)
However, e is missing the first line as compared to the first dataset
dim(e)
12487 2
dim(scores)
12488 5
and in fact
100001_at is missing from e.
I would greatly appreciate comments or suggestions!
Peter Robinson
_______________________________________________
Bioconductor mailing list
Bioconductor at stat.math.ethz.ch
https://www.stat.math.ethz.ch/mailman/listinfo/bioconductor
More information about the Bioconductor
mailing list