Last data update: 2014.03.03

R: Function to compute auto-correlation of probe intensities
autocorR Documentation

Function to compute auto-correlation of probe intensities

Description

Function to compute auto-correlation of probe intensities at specified offsets from the original positions.

Usage

autocor(x, probeAnno, chrom, samples = NULL, lag.max = 2000,
        lag.step = 100, cor.method = "pearson", 
        channel = c("red","green","logratio"),
        idColumn = "ID", verbose = TRUE)

Arguments

x

an object either of class ExpressionSet containing the normalized probe intensities or of class RGList containing the raw intensities.

probeAnno

Object of class probeAnno holding chromosomal match positions and indices of reporters in data matrix.

chrom

character; chromosome to compute the autocorrelation for

samples

which samples of the data to use; if more than 1 for each probe the mean intensity over these samples is taken.

lag.max

integer; maximal offset from the original position, the auto-correlation is to be computed for.

lag.step

integer; step size of lags between 0 and maximal lag.

cor.method

character; which type of correlation to compute, translates to argument method of function cor

channel

character; in case x is an RGList, which channel to plot, either red, green or the logratio log2(red)-log2(green)

idColumn

string; indicating which column of the genes data.frame of the RGList holds the identifier for reporters on the microarray. Character entries of the index elements of the probeAnno will be matched against these identifiers. If the index elements of the probeAnno are numeric or x is of class ExpressionSet, this argument will be ignored.

verbose

logical; extended output to STDOUT

Details

the lags, i.e. the offsets from the original position, the auto-correlation is to be computed for, are constructed from the given arguments as seq(0, lag.max, by=lag.step).

Value

Object of class autocor.result, a numeric vector of auto-correlation values at the offsets specified in argument lags. The lag values are stored as the names of the vector. Argument chrom is stored as attribute chromosome of the result.

Author(s)

Joern Toedling

See Also

cor,plot.autocor.result

Examples

  exDir <- system.file("exData",package="Ringo")
  load(file.path(exDir,"exampleProbeAnno.rda"))
  load(file.path(exDir,"exampleX.rda"))
  exAc <- autocor(exampleX, probeAnno=exProbeAnno,
                  chrom="9", lag.max=1000)
  plot(exAc)

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/autocorr.Rd_%03d_medium.png", width=480, height=480)
> ### Name: autocor
> ### Title: Function to compute auto-correlation of probe intensities
> ### Aliases: autocorr autocor autocorrelation
> ### Keywords: manip
> 
> ### ** Examples
> 
>   exDir <- system.file("exData",package="Ringo")
>   load(file.path(exDir,"exampleProbeAnno.rda"))
>   load(file.path(exDir,"exampleX.rda"))
>   exAc <- autocor(exampleX, probeAnno=exProbeAnno,
+                   chrom="9", lag.max=1000)
Lag: 0 ... 100 ... 200 ... 300 ... 400 ... 500 ... 600 ... 700 ... 800 ... 900 ... 1000 ... 
Computing correlation...>   plot(exAc)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>