Entering edit mode
Jukka Hiissa
▴
20
@jukka-hiissa-3051
Last seen 10.2 years ago
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
$`GO:0032515`
$`GO:0032515`$GOID
[1] "GO:0032515"
$`GO:0032515`$Evidence
[1] "IDA"
$`GO:0032515`$Ontology
[1] NA
$`GO:0032516`
$`GO:0032516`$GOID
[1] "GO:0032516"
$`GO:0032516`$Evidence
[1] "IDA"
$`GO:0032516`$Ontology
[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