R/gene2GO.R

Defines functions gene2GO

gene2GO <- function(gene, godata, dropCodes) {
    goAnno <- godata@geneAnno
    if (! "EVIDENCE" %in% colnames(goAnno)) {
        warning("Evidence codes not found, 'drop' parameter will be ignored...")
    } else {
        goAnno <- goAnno[!goAnno$EVIDENCE %in% dropCodes,]
    }
    go <- as.character(unique(goAnno[goAnno[,1] == gene, "GO"]))
    go[!is.na(go)]
}

Try the GOSemSim package in your browser

Any scripts or data that you put into this service are public.

GOSemSim documentation built on Nov. 8, 2020, 4:52 p.m.