R/dscore.R

Defines functions pscore plot.dscore dscore

Documented in dscore plot.dscore pscore

dscore<-function(x,...)
 UseMethod("dscore")


plot.dscore <- function(x, ...) {
  xx <- gsub(" alleles", "", names(x))
  plot(xx, x, type="h", xlab="risk alleles", 
       ylab="exact probability", col="red", lwd=2)
  
}

pscore <- function(q, x, ...){
  gs <- dscore(x, ...)
  ans <- sum(gs[1:(q+1)])
  ans
}
isglobal-brge/SNPassoc documentation built on April 7, 2018, 1:11 p.m.