R/genotype.R

Defines functions checkGenotypeMatrix

#' @export
checkGenotypeMatrix <- function(Z) {
  if (!is.matrix(Z)) {
    stop("Genotype must be in a numeric matrix.")
  }
  
  # make sure the data is numeric or integer.
  if ((typeof(Z) != "integer") & (typeof(Z) != "double")) {
    stop("Genotype matrix must be numeric (integer or double).")    
  }
  
  return(invisible(NULL)) 
  
}
DavisBrian/seqMetaPipeline documentation built on May 6, 2019, 1:56 p.m.