Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ppsetApply

Apply a function over the ProbeSets in an AffyBatch


Description

Apply a function over the ProbeSets in an AffyBatch

Usage

ppsetApply(abatch, FUN, genenames = NULL, ...)

ppset.ttest(ppset, covariate, pmcorrect.fun = pmcorrect.pmonly, ...)

Arguments

abatch

an object inheriting from AffyBatch.

ppset

an object of class ProbeSet.

covariate

the name a covariate in the slot phenoData.

pmcorrect.fun

a function to correct PM intensities.

FUN

a function working on a ProbeSet.

genenames

a list of Affymetrix probesets ids to work with. All probe set ids used when NULL.

...

optional parameters to the function FUN.

Value

Returns a list of objects, or values, as returned by the function FUN for each ProbeSet it processes.

Author(s)

Laurent Gautier <laurent@cbs.dtu.dk>

See Also

Examples

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)

affy

Methods for Affymetrix Oligonucleotide Arrays

v1.68.0
LGPL (>= 2.0)
Authors
Rafael A. Irizarry <rafa@ds.harvard.edu>, Laurent Gautier <lgautier@gmail.com>, Benjamin Milo Bolstad <bmb@bmbolstad.com>, and Crispin Miller <cmiller@picr.man.ac.uk> with contributions from Magnus Astrand <Magnus.Astrand@astrazeneca.com>, Leslie M. Cope <cope@mts.jhu.edu>, Robert Gentleman, Jeff Gentry, Conrad Halling <challing@agilixcorp.com>, Wolfgang Huber, James MacDonald <jmacdon@u.washington.edu>, Benjamin I. P. Rubinstein, Christopher Workman <workman@cbs.dtu.dk>, John Zhang
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.