readIntensities {arrayMagic} | R Documentation

## readIntensities

### Description

The function takes the `data.frame` `slideDescription` as input and reads the listed image analysis raw data files of the column `slideNameColumn`; cf. function `readpDataSlides`. Each image analysis raw data file must contain tab separated columns and a header line - not necessarily at the top of the file; cf. the arguments `removePattern` and `skip`. Each file may only contain the information for one channel, cf. argument `channelColumn`. The raw data information is returned as an object of class `arrayData`. Note: All image analysis quantification (=raw data) files have to correspond to the same type of microarray.

### Usage

    readIntensities(slideDescription, fileNameColumn="fileName", slideNameColumn, channelColumn = NULL, loadPath=".", type = "GenePix", spotAnnoColumns = NULL, dataColumns = NULL, removePattern = NULL, skip = NULL, spotIdentifier, quote = "\"'", verbose = TRUE)

### Arguments

`slideDescription` | `data.frame`; required; default: missing. (cf. the return value of the function `readpDataSlides`) The `data.frame` must contain at least one column; this column has to be named as the argument `fileNameColumn`. It may additionally contain a column named `slideNameColumn`.
`fileNameColumn` | character string; required; default: "fileName". `fileNameColumn` specifies the column which contains all image quantification result files in the `data.frame` of argument `slideDescription`.
`slideNameColumn` | character string; optional; default missing; refers to the `data.frame` of argument `slideDescription`. If `slideNameColumn` is missing the value is set to `fileNameColumn`.
`channelColumn` | named vector of character strings; optional; default `NULL`. If the `data.frame` of argument `slideDescription` contains information for each channel of every slide/hybridisation separately, the `channelColumn` vector contains the column name of the `data.frame` of argument `slideDescription` used to specify the channel. If `length(channelColumn) == 1` the character strings "green" and "red" are assumed to be used for the coding, otherwise `names(channelColumn)` must contain: `c("channelColumnName","green","red")`.
`loadPath` | character string; required; default: ".". The path is used to load the image quantification result files; note: "." refers to the working directory.
`spotIdentifier` | character string; optional; default missing. `spotIdentifier` specifies the column in the image analysis result files which contain spot or gene identifiers.
`type` | character string; required; possible values: "GenePix", "ScanAlyze", "generic" and "genericOneFilePerChannel"; cf. Details section. Note: value "generic" requires the arguments `spotAnnoColumns`, `dataColumns` and possibly `skip` and `removePattern`, value "genericOneFilePerChannel" additionally requires the argument "channelColumn"; whereas "GenPix" and "ScanAlyze" use predefined values if not otherwise specified; default: "GenePix".
`spotAnnoColumns` | vector of character strings; the column names of the image analysis data file. The columns must contain the same information for all files, e.g. the information on the layout of the microarray. The argument `spotIdentifier` is automatically added to the vector if not already included; default: `NULL`
`dataColumns` | named vector of character strings; the column names of the image analysis data file. The columns contain the raw intensities values of each spot; `names(dataColumns)` must contain: `c("greenForeground", "greenBackground", "redForeground", "redBackground")`; default: `NULL`
`removePattern` | character string defining a regular expression; default: `NULL`; all lines of each image analysis file, which match the regular expression are discarded.
`skip` | integer; default: `NULL`; number of lines skipped in each image analysis data file; Argument `skip` applies after all lines matched by the argument `removePattern` have been discarded.
`quote` | character string; required; default: `quote = "\"'"`. The argument `quote` is passed to the corresponding argument of `read.table` which is used inside this function.
`verbose` | logical; required; default `TRUE`

### Details

Details on the argument `type`: `type="GenePix"` defines `spotAnnoColumns = c("Block", "Column", "Row", "Name", "ID")` and `dataColumns = c("F532.Median", "B532.Median", "F635.Median", "B635.Median")` and corresponding `names(dataColumns) = c("greenForeground", "greenBackground", "redForeground", "redBackground")`, a dynamically determined argument `skip = grep("Block...Column", imageFile) - 1` and `removePattern = NULL`, whereas `type="ScanAlyze"` defines `spotAnnoColumns = c( "HEADER", "SPOT", "GRID", "ROW", "COL" )` and `dataColumns = c("CH1I", "CH1B", "CH2I", "CH2B")` and corresponding `names(dataColumns) = c("greenForeground", "greenBackground", "redForeground", "redBackground")`, `skip = 0` and `removePattern = "^REMARK"`.

### Value

object of class `arrayData`

### Author(s)

Andreas Buness <a.buness@dkfz.de>

### See Also

`readpDataSlides`, `arrayData-class`

### Examples

[Package arrayMagic version 1.5.0 Index]