Last data update: 2014.03.03

R: Function to visualize spatial distribution of raw intensities
image.RGListR Documentation

Function to visualize spatial distribution of raw intensities

Description

Function to visualize spatial distribution of raw intensities on NimbleGen Oligoarrays. Requires RGList with component genes complete with genes$X and genes$X coordinates of probes on array. arrayImage is a synonym of image.RGList.

Usage

## S3 method for class 'RGList'
image(x,arrayno,channel=c("red","green","logratio"),
         mycols=NULL, mybreaks=NULL, dim1="X", dim2="Y",
         ppch=20, pcex=0.3, verbose=TRUE, ...)

Arguments

x

object of class RGList containing red and green channel raw intensities; possibly result of readNimblegen.

arrayno

integer; which array to plot; one of 1:ncol(x$R)

channel

character; which channel to plot, either red, green or the logratio log2(red)-log2(green)

mycols

vector of colors to use for image; if NULL defaults to colorRampPalette(c("White", "Yellow", "Red"))(10)

mybreaks

optional numeric vector of breaks to use as argument breaks in image.default; default NULL means take length(mycols)+1 quantiles of the data as breaks.

dim1

string; which column of the 'genes' element of the supplied RGList indicates the first dimension of the reporter position on the microarray surface; for example this column is called 'X' with some NimbleGen arrays and 'Row' with some Agilent arrays.

dim2

string; which column of the 'genes' element of the supplied RGList indicates the second dimension of the reporter position on the microarray surface; for example this column is called 'Y' with some NimbleGen arrays and 'Col' with some Agilent arrays.

ppch

which symbol to use for intensities; passed on as pch to points..default

pcex

enlargement factor for intensity symbols; passed on as cex to points.default

verbose

logical; extended output to STDOUT?

...

further arguments passed on to plot.default and points.default

Value

invisibly returns NULL; function is called for its side effect, this is producing the plot

Author(s)

Joern Toedling

See Also

readNimblegen,plot.default, points

Examples

   exDir <- system.file("exData",package="Ringo")
   exRG <- readNimblegen("example_targets.txt","spottypes.txt",path=exDir)
   image(exRG, 1, channel="red", mycols=c("black","darkred","red"))
   ## this example looks strange because the example data files only
   ## includes the probe intensities of probes mapped to the forward
   ## strand of chromosome 9.
   ## you can see these probes are distributed all over the array

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/arrayImage.Rd_%03d_medium.png", width=480, height=480)
> ### Name: image.RGList
> ### Title: Function to visualize spatial distribution of raw intensities
> ### Aliases: arrayImage image.RGList image,RGList-method
> ### Keywords: hplot
> 
> ### ** Examples
> 
>    exDir <- system.file("exData",package="Ringo")
>    exRG <- readNimblegen("example_targets.txt","spottypes.txt",path=exDir)
Reading targets file...
Reading raw intensities...
Read header information
Read /home/ddbj/local/lib64/R/library/Ringo/exData/MOD_20551_PMT1_pair.txt 
Read /home/ddbj/local/lib64/R/library/Ringo/exData/MOD_20742_PMT1_pair.txt 
Determining probe categories...
Matching patterns for: GENE_EXPR_OPTION PROBE_ID 
Found 991 Probe 
Found 0 Probe 
Found 0 Probe 
Found 0 Negative 
Found 0 Empty 
Found 0 H_Code 
Found 0 V_Code 
Found 0 Random 
Setting attributes: values Color 
>    image(exRG, 1, channel="red", mycols=c("black","darkred","red"))
Dimensions of array: 765 x 1017 .
>    ## this example looks strange because the example data files only
>    ## includes the probe intensities of probes mapped to the forward
>    ## strand of chromosome 9.
>    ## you can see these probes are distributed all over the array
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>