R/viewProbabilityTable.R

Defines functions viewProbabilityTable

Documented in viewProbabilityTable

#' Displays underlying \emph{de novo} probability tables
#'
#' Tabulates probability of \emph{de novo} variant for each protein-coding variant class, for each gene.  Values are probability of a \emph{de novo} variant per chromosome per generation.  i.e. expected number of de novos for a given gene/class = \eqn{p * 2 * nsamples}.
#' @param format option to display table in wide format (default; one line per gene), or long format
#' @export
#' @importFrom reshape2 dcast

# --------------------

viewProbabilityTable <- function(format="wide"){
  if(format=="long"){
    return(pDNM)
  } else if (format=="wide") {
    return(
      reshape2::dcast(pDNM, hgncID + hgncSymbol + enstID + ensgID + geneName ~ class)
      )
  }
}

Try the denovolyzeR package in your browser

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

denovolyzeR documentation built on May 2, 2019, 12:43 p.m.