R/shapeTrend.R

Defines functions shapeTrend

Documented in shapeTrend

shapeTrend <- function(x){
  ll <- apply(x, 1, momentEstimates)
  sx <- log2(ll[1,])
  sy <- ll["k",]
  l <- lowess(sx, sy, f = 0.2)
  f <- approxfun(l, rule = 2)
  fx <- f(sx)
  fitted.a <- ((fx-2)/(fx-1))*(fx>1) + (-4)*(fx<=1)
  param <- list(mu=ll["mu",], D=ll["D",], a=fitted.a)
  param
}

Try the tweeDEseq package in your browser

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

tweeDEseq documentation built on Nov. 8, 2020, 5:59 p.m.