readDcp: Reads a dChip DCP file

Description Usage Arguments Value Author(s) See Also Examples

View source: R/readDcp.R

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]))
}

Example output

dChipIO v0.1.5 (2016-01-12) successfully loaded. See ?dChipIO for help.
$Header
[1] ""

$Format
[1] 4

$Normalized
[1] FALSE

$ThetaValid
[1] FALSE

$Median
[1] 143

$MaxInten
[1] 0

$CellDim
[1] 126

$DatFile
[1] "C:\\Documents and Settings\\hb\\braju.com.R\\aroma.affymetrix\\reengineeringdChip\\annotationData\\Test3-1-121502.CEL"

$BaselineFile
[1] ""

$ArrayOutlierPct
[1] 0

$SingleOutlierPct
[1] 0

$PresencePct
[1] 0

List of 7
 $ header               :List of 12
  ..$ Header          : chr ""
  ..$ Format          : int 4
  ..$ Normalized      : logi FALSE
  ..$ ThetaValid      : logi FALSE
  ..$ Median          : int 143
  ..$ MaxInten        : int 0
  ..$ CellDim         : int 126
  ..$ DatFile         : chr "C:\\Documents and Settings\\hb\\braju.com.R\\aroma.affymetrix\\reengineeringdChip\\annotationData\\Test3-1-121502.CEL"
  ..$ BaselineFile    : chr ""
  ..$ ArrayOutlierPct : num 0
  ..$ SingleOutlierPct: num 0
  ..$ PresencePct     : num 0
 $ rawIntensities       : int [1:15876] 190 11184 181 11144 154 162 10141 158 10507 140 ...
 $ normalizedIntensities: int [1:15876] 376 1082 4800 1404 0 0 0 0 0 0 ...
 $ calls                : raw [1:345] 00 00 00 00 ...
 $ thetas               : num [1:345] 2.19e-36 5.01e-40 2.81e+20 7.01e-45 5.51e-40 ...
 $ thetaStds            : num [1:345] 1.20e-35 6.43e-39 7.01e-45 5.86e-40 7.13e+31 ...
 $ excludes             : int [1:345] 4 327753 4849734 5439488 6 488564 1667694592 7 524391 6815828 ...
List of 7
 $ header               :List of 12
  ..$ Header          : chr ""
  ..$ Format          : int 4
  ..$ Normalized      : logi FALSE
  ..$ ThetaValid      : logi FALSE
  ..$ Median          : int 143
  ..$ MaxInten        : int 0
  ..$ CellDim         : int 126
  ..$ DatFile         : chr "C:\\Documents and Settings\\hb\\braju.com.R\\aroma.affymetrix\\reengineeringdChip\\annotationData\\Test3-1-121502.CEL"
  ..$ BaselineFile    : chr ""
  ..$ ArrayOutlierPct : num 0
  ..$ SingleOutlierPct: num 0
  ..$ PresencePct     : num 0
 $ rawIntensities       : int [1:15876] 190 11184 181 11144 154 162 10141 158 10507 140 ...
 $ normalizedIntensities: int [1:15876] 376 1082 4800 1404 0 0 0 0 0 0 ...
 $ calls                : raw [1:57] 00 00 00 00 ...
 $ thetas               : num [1:57] 2.81e+20 1.12e-44 1.40e-44 1.05e-39 1.07e+24 ...
 $ thetaStds            : num [1:57] 1.12e-44 8.61e-40 1.05e-38 1.74e-39 1.54e-44 ...
 $ excludes             : int [1:57] 6815828 2883584 10 720925 1966099 7274496 12 881780 1481000513 33685504 ...

dChipIO documentation built on May 2, 2019, 9:27 a.m.