[BioC] hyperGTest(paramsGO)
Chao-Jen Wong
cwon2 at fhcrc.org
Wed Jun 23 00:02:57 CEST 2010
Hi, Yuan,
Alternatively, if you goal is to make the hyperGTest function work on
your selected gene, you can either make use of the nsFilter function to
filter out the genes that are not annotated to GO term in biological
processes or write a simple filter function to do so. The former
requires your dataset to be in the form of ExpressionSet. The later can
be something like the following (suppose eset if your list of Entrez ID,
i.e. eset=c("6310", "10011340")):
ontology="BP"
Gos <- mget(eset, org.Hs.egGO, ifnotfound=NA)
haveGo <- sapply(Gos, function(x) {
if (length(x) == 1 && is.na(x)) FALSE
else {
onts <- Biobase::subListExtract(x, "Ontology",
simplify=TRUE)
ontology %in% onts
}})
eset <- eset[haveGo]
On 06/22/10 10:34, James W. MacDonald wrote:
> Hi Yu,
>
> Yuan Jian wrote:
>> hello there,
>>
>> when I run a toy example
>>> paramsGO <- new("GOHyperGParams", geneIds = "100113407",
>> universeGeneIds = c("6310","100113407"), annotation =
>> "org.Hs.eg.db", ontology = "BP",
>> pvalueCutoff = 0.05, conditional = FALSE, testDirection =
>> "over")
>>> hgGO_Over <- hyperGTest(paramsGO)
>> I got error below. "Error in getGoToEntrezMap_db(p) : The genes you
>> are testing do not have any corresponding GO terms for the ontology
>> you are searching."
>>
>> In my script, geneIDs are generated at runtime. How to make the
>> script continue running?
>> how to catch the error?
>
> ?try
> ?tryCatch
>
> Best,
>
> Jim
>
>
>
>
>>
>> thanks
>> YU
>>
>>
>>
>>
>>
>> [[alternative HTML version deleted]]
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Bioconductor mailing list
>> Bioconductor at stat.math.ethz.ch
>> https://stat.ethz.ch/mailman/listinfo/bioconductor
>> Search the archives:
>> http://news.gmane.org/gmane.science.biology.informatics.conductor
>
--
Chao-Jen Wong
Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Avenue N., M1-B514
PO Box 19024
Seattle, WA 98109
206.667.4485
cwon2 at fhcrc.org
More information about the Bioconductor
mailing list