File: writeAndReadEmptyCdf.R

package info (click to toggle)
r-bioc-affxparser 1.70.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 5,904 kB
  • sloc: cpp: 70,645; ansic: 1,688; sh: 13; makefile: 5
file content (23 lines) | stat: -rw-r--r-- 518 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
library("affxparser");

# Create a CDF structure for a chip type with 2-by-3 cells
hdr <- list(
  chiptype="Empty2x3",
  nrows=2, ncols=3,
  nunits=0, nqcunits=0, 
  refseq=""
);
units <- qcUnits <- list();

# Write CDF file
pathname <- file.path(tempdir(), "Empty2x3.cdf");
str(pathname);
writeCdf(pathname, cdfheader=hdr, cdf=units, cdfqc=qcUnits, overwrite=TRUE);

# Read CDF header
hdr2 <- readCdfHeader(pathname);
str(hdr2);

# Read CDF units
units2 <- readCdfUnits(pathname);
str(units2);