R/generateExprVal.method.mas.R

Defines functions affy.scalevalue.exprSet generateExprVal.method.mas

Documented in affy.scalevalue.exprSet generateExprVal.method.mas

generateExprVal.method.mas <- function(probes, ...)
{
  
  probes <- log2(probes)
  M <-  ncol(probes)
  slg <- rep(NA,M)
  
  for (i in 1:ncol(probes)) {
    
    slg[i] <- tukey.biweight(probes[ ,i], ...)
    
  }
  
  return(list(exprs=2^slg,se.exprs=rep(NA,M)))
    
}

affy.scalevalue.exprSet <- function(eset, sc=500, analysis="absolute")
{
  
  analysis <- match(analysis, c("absolute", "comparison"))
  
  if(analysis == 1)
    nf <- 1
  else
    stop("sorry! comparison not implemented.")
  for (i in 1:ncol(exprs(eset))) {
    slg <- exprs(eset)[, i]
    sf <- sc / mean(slg, trim=0.02)  
    reported.value <- nf * sf * slg
    exprs(eset)[, i] <- reported.value
  }
  
  return(eset)
}

Try the affy package in your browser

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

affy documentation built on Nov. 8, 2020, 8:18 p.m.