R/checkCNV.R

Defines functions checkCNV

checkCNV <-
function(obj, alpha=0.05) {
  out <- TRUE
  meanRatio <- attr(obj,"meanRatio")
  if (is.null(meanRatio))
    stop("CNV must contain intensity data")
  else{
    mins <- by(meanRatio,obj,min)
    maxs <- by(meanRatio,obj,max)
    out <- cor(mins,maxs,method="spearman")==1
  }
  pvalue <- attr(obj,"mixture")$P
  if (!is.null(pvalue))
    out <- !is.nan(pvalue) && pvalue >= alpha && out
  return(out)
}

Try the CNVassoc package in your browser

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

CNVassoc documentation built on May 30, 2017, 12:50 a.m.