R/update.raw.geno.R

Defines functions update.raw.geno

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