[BioC] GO terms
michael watson (IAH-C)
michael.watson at bbsrc.ac.uk
Tue Feb 16 10:27:37 CET 2010
I have no idea if this helps, but the first thing I do with GO.db is turn it into a data.frame.
I realise this loses the hierarchical structure, but it is invaluable if you want to use functions such as merge().
library(GO.db)
xx <- as.list(GOTERM)
foo <- function(x) c(GOID(x), Term(x),Definition(x), Ontology(x))
gomat <- t(sapply(xx, foo, simplify=TRUE))
gomat <- as.data.frame(gomat)
colnames(gomat) <- c("ID","Term","Definition","Ontology")
-----Original Message-----
From: bioconductor-bounces at stat.math.ethz.ch [mailto:bioconductor-bounces at stat.math.ethz.ch] On Behalf Of Heidi Dvinge
Sent: 16 February 2010 00:15
To: Adrian Johnson
Cc: bioconductor at stat.math.ethz.ch
Subject: Re: [BioC] GO terms
Hello Adrian,
could you perhaps provide your sessionInfo? When I use the examples
provide on probeSetSummary in GOstats to create an object called ps, I can
then say:
> ps[1]
$`GO:0043412`
EntrezID ProbeSetID selected
1 10114 102_at 1
2 10114 41501_at 0
3 10114 41502_at 0
4 10152 1040_s_at 1
5 10152 135_g_at 0
...
> names(ps)[1:10]
[1] "GO:0043412" "GO:0006796" "GO:0006468" "GO:0044267" "GO:0044260"
"GO:0042221" "GO:0002520"
[8] "GO:0045321" "GO:0044419" "GO:0030097"
> Term(names(ps)[1:10])
GO:0043412
GO:0006796
"biopolymer modification" "phosphate
metabolic process"
GO:0006468
GO:0044267
"protein amino acid phosphorylation" "cellular protein
metabolic process"
GO:0044260
GO:0042221
"cellular macromolecule metabolic process" "response to
chemical stimulus"
GO:0002520
GO:0045321
"immune system development"
"leukocyte activation"
GO:0044419
GO:0030097
"interspecies interaction between organisms"
"hemopoiesis"
> sessionInfo()
R version 2.10.0 (2009-10-26)
i386-apple-darwin8.11.1
locale:
[1] en_GB.UTF-8/en_GB.UTF-8/C/C/en_GB.UTF-8/en_GB.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] GO.db_2.3.5 GOstats_2.12.0 graph_1.24.0
Category_2.12.0 annotate_1.24.0
[6] hgu95av2.db_2.3.5 org.Hs.eg.db_2.3.6 RSQLite_0.7-3 DBI_0.2-4
AnnotationDbi_1.8.0
[11] affy_1.24.0 Biobase_2.6.0
loaded via a namespace (and not attached):
[1] affyio_1.14.0 genefilter_1.28.0 GSEABase_1.8.0
preprocessCore_1.8.0
[5] RBGL_1.22.0 splines_2.10.0 survival_2.35-7
tools_2.10.0
[9] XML_2.6-0 xtable_1.5-5
> Hi Heidi,
> Thanks for quick reply.
> It doesnt work for me. Although GOTERMS$"GO:ID" works.
>
> I have all my GOIDs in a list, I want to get the terms for that IDs in
> character vector.
>
>
>> Term("GO:0006916")
> Error in function (classes, fdef, mtable) :
> unable to find an inherited method for function "Term", for
> signature "character"
>
>> GOTERM$"GO:0006916"
> GOID: GO:0006916
> Term: anti-apoptosis
> Ontology: BP
> Definition: A process which directly inhibits any of the steps required
> for cell death by apoptosis.
> Synonym: apoptosis inhibitor activity
>
> Using GOTERM, I dont know how to capture 'Term'. I cannot use a sapply
> function over GOTERMS too.
>
> -Adrian
>
>
>
>
>
>
> On Mon, Feb 15, 2010 at 6:53 PM, Heidi Dvinge <heidi at ebi.ac.uk> wrote:
>> Hello Adrian,
>>
>> if you just want the term and nothing else you can say e.g.
>>
>>> library(GO.db)
>> Loading required package: AnnotationDbi
>> Loading required package: Biobase
>>
>> Welcome to Bioconductor
>>
>> Vignettes contain introductory material. To view, type
>> 'openVignette()'. To cite Bioconductor, see
>> 'citation("Biobase")' and for packages 'citation(pkgname)'.
>>
>> Loading required package: DBI
>>> Term("GO:0006916")
>> GO:0006916
>> "anti-apoptosis"
>>
>>
>> HTH
>> \Heidi
>>> Dear Group,
>>> Is there any function in GOstats or other packages, that could give
>>> term name given GO ID.
>>>
>>> I have the result from probeSetSummary. I want to pull the GO term
>>> name along with GO term ID.
>>>
>>> Thanks
>>> Adrian
>>>
>>> _______________________________________________
>>> 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
>>>
>>
>>
>>
>
_______________________________________________
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
More information about the Bioconductor
mailing list