computeRunningMedians {Ringo} | R Documentation |
Function to compute running medians (or other quantiles) on a tiling expression set.
computeRunningMedians(xSet, probeAnno, modColumn = "Cy5", allChr = c(1:19, "X", "Y"), winHalfSize = 400, min.probes = 5, quant = 0.5, combineReplicates = FALSE, verbose = TRUE)
xSet |
Object of class ExpressionSet holding the
normalized probe intensity data |
probeAnno |
Environment holding the genomic positions of probes in the ExpressionSet |
modColumn |
Column of the ExpressionSet's phenoData
holding the samples' difference of interest |
allChr |
Character vector of all chromosomes in genome |
winHalfSize |
Half the size of the window centered at a probe position, in which all other probes contribute to the calculation of the median. |
min.probes |
integer; if less probes are in the sliding window, NA instead of the median is returned. This meant to avoid to computing non-meaningful medians. If unwanted, set this to 1 or less |
quant |
numeric; which quantile to use for the smoothing.
The default 0.5 means compute the median over the values in
the sliding window. |
combineReplicates |
logical; should the median not be computed
over individual samples in the ExpressionSet, but should samples be
combined according to the column modColumn of the
phenoData . The median is then computed across all probe
levels and samples of the same type in the window. The resulting
ExpressionSet has so many columns as are there different entries in
the column modColumn |
verbose |
logical; detailed progress output to STDOUT? |
An object of class ExpressionSet
, holding smoothed intentesity
values for the probes of the supplied ExpressionSet. The number of
results samples is the number of levels in the supplied
modColumn
of the supplied ExpressionSet's phenoData.
Joern Toedling toedling@ebi.ac.uk
ExpressionSet
,
sliding.quantile
current.dir <- getwd() setwd(system.file("exData",package="Ringo")) load("exampleProbeAnno.rda") load("exampleX.rda") setwd(current.dir) smoothX = computeRunningMedians(exampleX, probeAnno=exProbeAnno, modColumn = "Cy5", allChr = c("8"), winHalfSize = 400, verbose = TRUE) par(mfrow=c(1,1)) chipAlongChrom(exampleX, chrom="8", xlim=c(60208000,60216000), ylim=c(-1,6), probeAnno=exProbeAnno, gff=exGFF) chipAlongChrom(smoothX, chrom="8", xlim=c(60208000,60216000), ylim=c(-1,6), probeAnno=exProbeAnno, gff=exGFF, itype="l", ilwd=3, add=TRUE) ## combine over replicates: smoothX2 = computeRunningMedians(exampleX, probeAnno=exProbeAnno, modColumn = "Cy5", allChr = c("8"), winHalfSize = 400, combineReplicates=TRUE, verbose = TRUE) chipAlongChrom(exampleX, chrom="8", xlim=c(60208000,60216000), ylim=c(-1,6), probeAnno=exProbeAnno, gff=exGFF) chipAlongChrom(smoothX2, chrom="8", xlim=c(60208000,60216000), ylim=c(-1,6), probeAnno=exProbeAnno, gff=exGFF, itype="l", ilwd=3, paletteName="Spectral", add=TRUE)