[BioC] Bug in getOntoly-function (package annotate)?

Jukka Hiissa jahiis at utu.fi
Thu Oct 2 09:00:48 CEST 2008

Dear BioC users,

I am having problems with the getOntology-function (annotate-package v.
1.18 ) The command

getOntology(getGO( "7650504", "illuminaHumanBCv2")[[1]], "BP" )
[1] "GO:0032515" "GO:0032516"

returns two GO identifiers, but they are not correct since their
ontologies are in fact NA

[1] "GO:0032515"
[1] "IDA"
[1] NA

[1] "GO:0032516"
[1] "IDA"
[1] NA

I looked at the getOntology source code and I think that the problem is
that the NAs are removed from the index vector but not from the list
containing the GO-elements. The last two lines in the getOntology
function are

onts = onts[!is.na(onts)]
unique(names(inlist[onts %in% which]))

where the onts contains the ontology labels, e.g.

GO:0000159 GO:0005524 GO:0005625 GO:0008160 GO:0008601 GO:0008601
         NA       "MF"       "CC"       "MF"       "MF"       "MF"
GO:0016887 GO:0019211 GO:0032515 GO:0032516 GO:0035307 GO:0035308
       "MF"       "MF"         NA         NA       "BP"       "BP"
GO:0042803 GO:0046982 GO:0051721
       "MF"       "MF"       "MF"

After the NAs are removed from the onts vector the indexes of the two
BP-ontology cases are 8 and 9, but these are not the correct indexes for
the inlist list, which still contains the three missing ontology cases.

names( inlist )
[1] "GO:0000159" "GO:0005524" "GO:0005625" "GO:0008160" "GO:0008601"
[6] "GO:0008601" "GO:0016887" "GO:0019211" "GO:0032515" "GO:0032516"
[11] "GO:0035307" "GO:0035308" "GO:0042803" "GO:0046982" "GO:0051721

Best regards,
Jukka Hiissa

More information about the Bioconductor mailing list