[BioC] problem with getGOOntology

Sean Davis sdavis2 at mail.nih.gov
Thu Apr 7 23:58:10 CEST 2005


On Apr 7, 2005, at 5:46 PM, Francois Pepin wrote:

>> I didn't find a function getGOontology.  Can you post a little
>> self-contained piece of code that mimics the problem?
>
> It's in GOstats.
>
>> getGOOntology
> function (x)
> {
>     if (!is.character(x))
>         stop("need a character argument")
>     if (length(x) == 0)
>         return(character(0))
>     wh <- mget(x, env = GOTERM, ifnotfound = NA)
>     return(sapply(wh, Ontology))
> }
>

My bad.  The lowercase 'o' got me.

If you haven't already done it, looks like a line:

wh <- wh[!is.na(wh)]

right before the return line might do the trick.

Sean



More information about the Bioconductor mailing list