R/update.ref.geno.R

Defines functions update.ref.geno

update.ref.geno <- function(ref.geno, exc.snps){
  
  if(length(exc.snps) == 0){
    return(ref.geno)
  }
  
  id <- which(!(colnames(ref.geno) %in% exc.snps))
  if(length(id) == 0){
    msg <- "All SNPs excluded in update.ref.geno"
    stop(msg)
  }
  
  ref.geno <- ref.geno[, id, drop = FALSE]
  ref.geno
  
}
zhangh12/ARTP2 documentation built on Aug. 16, 2019, 7:27 p.m.