R/BasePositionNormalization.getFit.R

setMethodS3("getFit", "BasePositionNormalization", function(this, array, ...) {
  # Assert that the normalization has been done
  if (!isDone(this)) {
    throw("Cannot get fit: Data is not processed: ", getFullName(this))
  }

  # Argument 'array':
  inSet <- getInputDataSet(this)
  array <- Arguments$getIndices(array, max=length(inSet))

  outSet <- getOutputDataSet(this)
  outDf <- outSet[[array]]
  path <- getPath(this)
  filename <- sprintf("%s,fit.RData", getFullName(outDf))
  pathname <- Arguments$getReadablePathname(filename, path=path, mustExist=TRUE)
  res <- loadObject(pathname)
  fit <- res$fit
  # Not needed anymore
  res <- NULL

  fit
}, protected=TRUE)
HenrikBengtsson/aroma.affymetrix documentation built on Feb. 20, 2024, 9:07 p.m.