array2channel {limma} | R Documentation

## Convert Two-Color Targets File to One-Row-Per-Channel

### Description

Convert a two-color targets from with one row per array to one with one row per channel.

### Usage

    array2channel(targets, channel.codes=c(1,2), channel.columns=list(Target=c("Cy3","Cy5")), grep=FALSE)

### Arguments

`targets` | data.frame with one row per array giving information about target samples associated covariates.
`channel.codes` | numeric or character vector of length 2 giving codes for the channels
`channel.columns` | named list of character vectors of length 2. Each entry gives a pair of names of columns in `targets` which contain channel-specific information. This pair of columns should be assembled into one column in the output.
`grep` | logical, if `TRUE` then the column names are founding by `grep`ing, i.e., the actual column names need only contain the names given by `channel.columns` as substrings

### Details

This function is used to convert the usual two-color representation of target information into a form suitable for single-channel analysis.

### Value

data.frame with twice as many rows as `targets`. Any pair of columns named by `channel.columns` will now be one column.

### Author(s)

Gordon Smyth

### See Also

`coerce,RGList,exprSet-method`

An overview of methods for single channel analysis in limma is given by 6.SingleChannel.

### Examples

    targets <- data.frame(FileName=c("file1.gpr","file2.gpr"),Cy3=c("WT","KO"),Cy5=c("KO","WT"))
    array2channel(targets)

[Package Contents]