Apply a function over the ProbeSets in an AffyBatch
Apply a function over the ProbeSets in an AffyBatch
ppsetApply(abatch, FUN, genenames = NULL, ...) ppset.ttest(ppset, covariate, pmcorrect.fun = pmcorrect.pmonly, ...)
abatch |
an object inheriting from |
ppset |
an object of class |
covariate |
the name a covariate in the slot |
pmcorrect.fun |
a function to correct PM intensities. |
FUN |
a function working on a |
genenames |
a list of Affymetrix probesets ids to work with. All
probe set ids used when |
... |
optional parameters to the function |
Returns a list
of objects, or values, as returned by the
function FUN
for each ProbeSet
it processes.
Laurent Gautier <laurent@cbs.dtu.dk>
ppset.ttest <- function(ppset, covariate, pmcorrect.fun = pmcorrect.pmonly, ...) { probes <- do.call("pmcorrect.fun", list(ppset)) my.ttest <- function(x) { y <- split(x, get(covariate)) t.test(y[[1]], y[[2]])$p.value } r <- apply(probes, 1, my.ttest) return(r) } ##this takes a long time - and rowttests is a good alternative ## eg: rt = rowttests(exprs(Dilution), Dilution$liver) ## Not run: data(Dilution) all.ttest <- ppsetApply(Dilution, ppset.ttest, covariate="liver") ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.