Reads a dChip DCP file

Share:

Description

Reads a dChip DCP file.

Usage

1
2
readDcp(con, fields=c("rawIntensities", "normalizedIntensities", "calls", "thetas",
  "thetaStds", "excludes"), cells=NULL, units=NULL, .nbrOfUnits=NULL, ...)

Arguments

con

A connection or a character filename.

fields

A character vector specifying the fields to be read.

cells

An integer vector specifying the indices of the cell data to be read.

units

An integer vector specifying the indices of the unit data to be read.

.nbrOfUnits

A integer specifying the number of units available in the file. If NULL, this is inferred from the file size and the file header. The dChip software itself instead uses the corrsponding value in the CDF.bin file, but that file is specified by the user leaving room for errors.

...

Not used.

Value

Returns a list structure containing the file header and the requested data fields.

Author(s)

Henrik Bengtsson

See Also

To read only the DCP file header, see readDcpHeader().

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
path <- system.file("exData", package="dChipIO")

filename <- "Test3-1-121502.dcp"
pathname <- file.path(path, filename)

hdr <- readDcpHeader(pathname)
print(hdr)

data <- readDcp(pathname)
str(data)

# Read a subset of the units
units <- c(10:11, 15:20, 150:105, 2,2,2)
dataT <- readDcp(pathname, units=units)
str(dataT)

# Assert correctness
for (ff in c("calls", "thetas", "thetaStds", "excludes")) {
  stopifnot(length(dataT[[ff]]) == length(units))
  stopifnot(identical(dataT[[ff]], data[[ff]][units]))
}