R/TFMPvalue-pv2sc.R

Defines functions TFMpv2sc

Documented in TFMpv2sc

TFMpv2sc <- function(mat, pvalue, bg=c(A=0.25, C=0.25, G=0.25, T=0.25),
                     type=c("PFM", "PWM")){
  ## TODD: valiate these mat, bg
  type <- match.arg(type)
  if(length(pvalue) != 1L){
    stop("pvalue must be length of 1")
  }
  bg <- normargPriorParams(bg)
  if(type == "PFM"){
    mat <- normargMat(mat)
  }
  score <- .Call("pv2sc", mat, pvalue, bg, type, PACKAGE="TFMPvalue")
  return(score)
}
ge11232002/TFMPvalue documentation built on Oct. 26, 2022, 7:09 p.m.