R/AromaCellPositionFile.AFFX.R

# @author "MR, HB"
setMethodS3("allocateFromCdf", "AromaCellPositionFile", function(static, cdf, path=NULL, tags="*", ...) {
  # Argument 'cdf':
  cdf <- Arguments$getInstanceOf(cdf, "AffymetrixCdfFile")

  # Argument 'tags':
  tags <- Arguments$getTags(tags, collapse=NULL)


  chipType <- getChipType(cdf)
  parts <- strsplit(chipType, split=",", fixed=TRUE)
  parts <- unlist(parts, use.names=FALSE)

  tags[tags == "*"] <- paste(parts[-1], collapse=",")
  chipType <- parts[1]
  chipType <- gsub(",monocell", "", chipType)

  # Output path
  if (is.null(path)) {
    path <- file.path("annotationData", "chipTypes", chipType)
  }
  path <- Arguments$getWritablePath(path)

  platform <- getPlatform(cdf)
  nbrOfCells <- nbrOfCells(cdf)
  fullname <- paste(c(chipType, tags), collapse=",")
  ext <- getFilenameExtension(static)
  filename <- sprintf("%s.%s", fullname, ext)
  allocate(static, filename=filename, path=path, nbrOfCells=nbrOfCells,
      platform=platform, chipType=chipType, ...)
}, static=TRUE)

Try the aroma.affymetrix package in your browser

Any scripts or data that you put into this service are public.

aroma.affymetrix documentation built on April 17, 2018, 1:03 a.m.