Last data update: 2014.03.03

R: Function to compute running medians on a tiling expression...
computeRunningMediansR Documentation

Function to compute running medians on a tiling expression set

Description

Function to compute running medians (or other quantiles) on a tiling expression set.

Usage

computeRunningMedians(xSet, probeAnno, modColumn = "Cy5",
 allChr, winHalfSize = 400, min.probes = 5, quant = 0.5,
 combineReplicates = FALSE, nameSuffix = ".sm", checkUnique=TRUE,
 uniqueCodes=c(0), verbose = TRUE)

Arguments

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; if not specified (defaul) all chromosomes annotated in the supplied probeAnno are used.

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

nameSuffix

character; suffix attached to the sample labels of the supplied ExpressionSet xSet for the sample names of the resulting ExpressionSet.

checkUnique

logical; indicates whether the uniqueness indicator of probe matches from the probeAnno environment should be used.

uniqueCodes

numeric; which numeric codes in the chromosome-wise match-uniqueness elements of the probeAnno environment indicate uniqueness?

verbose

logical; detailed progress output to STDOUT?

Value

An object of class ExpressionSet, holding smoothed intensity values for the probes of the supplied ExpressionSet. The number of results samples is either the number of levels in the supplied modColumn of the supplied ExpressionSet's phenoData if combineReplicates is set to TRUE or equal to the number of samples in the supplied ExpressionSet xSet otherwise.

Author(s)

Joern Toedling

See Also

ExpressionSet, sliding.quantile, probeAnno-class

Examples

  exDir <- system.file("exData",package="Ringo")
  load(file.path(exDir,"exampleProbeAnno.rda"))
  load(file.path(exDir,"exampleX.rda"))
  smoothX <- computeRunningMedians(exampleX, probeAnno=exProbeAnno,
                                   winHalfSize = 400)
  combX <- combine(exampleX, smoothX)
  if (interactive()){
   grid.newpage()
   plot(combX, exProbeAnno, chrom="9", xlim=c(34318000,34321000),
        ylim=c(-2,4), gff=exGFF)
  }

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(Ringo)
Loading required package: Biobase
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
    get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
    match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
    rbind, rownames, sapply, setdiff, sort, table, tapply, union,
    unique, unsplit

Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: RColorBrewer
Loading required package: limma

Attaching package: 'limma'

The following object is masked from 'package:BiocGenerics':

    plotMA

Loading required package: Matrix
Loading required package: grid
Loading required package: lattice
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/Ringo/computeRunningMedians.Rd_%03d_medium.png", width=480, height=480)
> ### Name: computeRunningMedians
> ### Title: Function to compute running medians on a tiling expression set
> ### Aliases: computeRunningMedians
> ### Keywords: manip
> 
> ### ** Examples
> 
>   exDir <- system.file("exData",package="Ringo")
>   load(file.path(exDir,"exampleProbeAnno.rda"))
>   load(file.path(exDir,"exampleX.rda"))
>   smoothX <- computeRunningMedians(exampleX, probeAnno=exProbeAnno,
+                                    winHalfSize = 400)

Chromosome 9 ...
Suz12_vs_total ... 
Construction result ExpressionSet...Done.
>   combX <- combine(exampleX, smoothX)
> #  if (interactive()){
>    grid.newpage()
>    plot(combX, exProbeAnno, chrom="9", xlim=c(34318000,34321000),
+         ylim=c(-2,4), gff=exGFF)
> #  }
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>