R/check_gene_names.R

Defines functions check_gene_names

#' check_gene_names
#' 
#' checks if gene names looks like an EntrezID with a prefix of X. 
#' @param ... takes named vectors
#' @noRd
check_gene_names <- function(...){
    
    res = lapply(list(...),function(x){
        if(any(duplicated(names(x)))){
            stop("Duplicated gene names detected. Gene names in inputs should be unique.")
        }
        TRUE
    }
    )
    
    return(unlist(res))
    
}
saezlab/cosmosR documentation built on July 27, 2024, 1:30 p.m.