R/AffymetrixCsvFile.R

# @author "HB"
setConstructorS3("AffymetrixCsvFile", function(..., sep=",", .verify=TRUE) {
  this <- extend(AffymetrixTabularFile(..., .verify=FALSE), "AffymetrixCsvFile")

  if (.verify) {
    verify(this, ...)
  }

  this
})


setMethodS3("getDefaultExtension", "AffymetrixCsvFile", function(static, ...) {
  "csv"
}, static=TRUE, protected=TRUE)

setMethodS3("getExtensionPattern", "AffymetrixCsvFile", function(static, ...) {
  ext <- getDefaultExtension(static, ...)
  pattern <- sprintf("[.](%s|%s)$", tolower(ext), toupper(ext))
  pattern
}, static=TRUE, protected=TRUE)


setMethodS3("findByChipType", "AffymetrixCsvFile", function(static, chipType, pattern=sprintf("^%s.*%s", chipType, getExtensionPattern(static)), ...) {
  NextMethod("findByChipType", chipType=chipType, pattern=pattern)
}, static=TRUE, protected=TRUE)
HenrikBengtsson/aroma.affymetrix documentation built on Feb. 20, 2024, 9:07 p.m.