R/get_afth.R

Defines functions get_afth

get_afth <- function(num,
                     idx,
                     next.bin.AFgtz,
                     next.bin.AFetz,
                     vafcov,
                     this.detection.specificity){
  if(length(idx) < next.bin.AFgtz){
    b = vafcov[sample(x = idx,size = next.bin.AFgtz,replace = TRUE),1]
  } else {
    b = vafcov[sample(x = idx,size = next.bin.AFgtz,replace = FALSE),1]
  }
  afth = quantile.zaf(x = b,probs = this.detection.specificity,nz = next.bin.AFetz)
  return(afth)
}

Try the abemus package in your browser

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

abemus documentation built on Dec. 19, 2019, 1:07 a.m.