R/getOrganismCode.R

Defines functions getOrganismCode

Documented in getOrganismCode

getOrganismCode <- function(name) {
    organism <- .jcall(
        "org/bridgedb/bio/Organism",
        "Lorg/bridgedb/bio/Organism;",
        "fromLatinName", name
    )
    if (is.null(organism)) {
        stop(paste("Unknown species:", name))
    }
    organism$code()
}
egonw/BridgeDbR documentation built on Nov. 8, 2024, 4:21 a.m.