readCdfBin: Reads a dChip CDF.bin file

Description Usage Arguments Value Author(s) See Also Examples

View source: R/readCdfBin.R

Description

Reads a dChip CDF.bin file.

Please note that this method is incomplete as it currently doesn't read all fields. It is only made available so that someelse can continue the development.

Usage

1

Arguments

con

A connection or a character filename.

units

An integer vector specifying the units to be read. If NULL, all units are read.

...

Not used.

Value

Returns a list structure containing the file header and the unit data.

Author(s)

Henrik Bengtsson

See Also

To read only the CDF.bin file header, see readCdfBinHeader().

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")
chipType <- "Test3"
filename <- sprintf("%s.CDF.bin", chipType)
pathname <- file.path(path, filename)

hdr <- readCdfBinHeader(pathname)
print(hdr)

data <- readCdfBin(pathname)
str(data)

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

# Assert correctness
for (ff in c("unitNames", "numProbes", "CellPos")) {
  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.
$FileName
[1] "C:\\Documents and Settings\\hb\\braju.com.R\\aroma.affymetrix\\reengineeringdChip\\annotationData\\Test3.CDF.bin"

$Format
[1] 4

$ChipType
[1] "Test3"

$CellDim
[1] 126

$NumUnit
[1] 345

List of 4
 $ header   :List of 5
  ..$ FileName: chr "C:\\Documents and Settings\\hb\\braju.com.R\\aroma.affymetrix\\reengineeringdChip\\annotationData\\Test3.CDF.bin"
  ..$ Format  : int 4
  ..$ ChipType: chr "Test3"
  ..$ CellDim : int 126
  ..$ NumUnit : int 345
 $ unitNames: chr [1:345] "Pae_16SrRNA_s_at" "Pae_23SrRNA_s_at" "PA1178_oprH_at" "PA1816_dnaQ_at" ...
 $ numProbes: int [1:345] 32 32 24 24 24 24 24 32 32 24 ...
 $ CellPos  : int [1:345] 0 0 0 0 0 0 0 0 0 0 ...
List of 4
 $ header   :List of 5
  ..$ FileName: chr "C:\\Documents and Settings\\hb\\braju.com.R\\aroma.affymetrix\\reengineeringdChip\\annotationData\\Test3.CDF.bin"
  ..$ Format  : int 4
  ..$ ChipType: chr "Test3"
  ..$ CellDim : int 126
  ..$ NumUnit : int 345
 $ unitNames: chr [1:57] "PA1178_oprH_st" "PA1816_dnaQ_st" "AFFX-Athal-Actin_5_r_at" "AFFX-Athal-Actin_M_at" ...
 $ numProbes: int [1:57] 24 24 32 32 32 32 32 32 32 32 ...
 $ CellPos  : int [1:57] 0 0 0 0 0 0 0 0 0 0 ...

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