[BioC] Query Gene Ontology
Marc Carlson
mcarlson at fhcrc.org
Thu May 19 00:06:58 CEST 2011
My answer is almost identical to Jims, but I wanted to mention that
there are also some handy helper functions for the GO mappings such as
Term() and GOID():
library(org.Hs.eg.db)
library(GO.db)
# here is where I thought that the helper functions might make what we
are doing bit easier to see? (YMMV)
goID <- GOID( GOTERM[ Term(GOTERM) == "myelination" ] )
# the rest is going to be basically the same.
get(goID, org.Hs.egGO2ALLEGS)
Marc
On 05/18/2011 10:40 AM, James W. MacDonald wrote:
> Hi Herve,
>
> On 5/18/2011 9:16 AM, LEMAITRE Hervé Université Paris Sud wrote:
>> Dear bioconductor-users,
>>
>>
>>
>> I'm looking for a way to query the gene ontology in R like in the GO
>> browser (AmiGO). I tried different packages (NCBI2R, GOsim ...) but I
>> did not find a simple way to extract genes names associated to a GO
>> term (i.e. myelination). Could you tell me if there is a way to do
>> that?
>
> > library(org.Hs.eg.db)
> > library(GO.db)
> > ind <- x[x$Term == "myelination",1]
> > ind
> [1] "GO:0042552"
> > egs <- get(ind, org.Hs.egGO2ALLEGS)
> > egs
> ISS ISS IEA IEA IEA IEA IEA ISS
> IEA NAS
> "745" "928" "1000" "1959" "2064" "3073" "3074" "3170"
> "3611" "4118"
> TAS IEA IEA IEA ISS IEA IEA IEA
> IEA IEA
> "4118" "4155" "4664" "4665" "4763" "4908" "5354" "5376"
> "5453" "5454"
> NAS ISS ISS IEA ISS IEA IEA IEA
> ISS IEA
> "5653" "6326" "6334" "6497" "6647" "7038" "7040" "7248"
> "7572" "8443"
> IMP IMP IMP ISS IEA ISS IEA IEA
> ISS ISS
> "8890" "8892" "8893" "9451" "9514" "9921" "10215" "10939"
> "11202" "23114"
> NAS ISS IEA IEA ISS NAS IEA
> "23205" "23405" "50846" "51090" "57463" "81846" "84504"
>
> You could filter at this point, if you wanted e.g., just ISS terms.
>
> > genes <- unlist(mget(egs, org.Hs.egSYMBOL))
> > genes
> 745 928 1000 1959 2064 3073 3074
> 3170
> "C11orf9" "CD9" "CDH2" "EGR2" "ERBB2" "HEXA" "HEXB"
> "FOXA2"
> 3611 4118 4118 4155 4664 4665 4763
> 4908
> "ILK" "MAL" "MAL" "MBP" "NAB1" "NAB2" "NF1"
> "NTF3"
> 5354 5376 5453 5454 5653 6326 6334
> 6497
> "PLP1" "PMP22" "POU3F1" "POU3F2" "KLK6" "SCN2A" "SCN8A"
> "SKI"
> 6647 7038 7040 7248 7572 8443 8890
> 8892
> "SOD1" "TG" "TGFB1" "TSC1" "ZNF24" "GNPAT" "EIF2B4"
> "EIF2B2"
> 8893 9451 9514 9921 10215 10939 11202
> 23114
> "EIF2B5" "EIF2AK3" "GAL3ST1" "RNF10" "OLIG2" "AFG3L2" "KLK8"
> "NFASC"
> 23205 23405 50846 51090 57463 81846 84504
> "ACSBG1" "DICER1" "DHH" "PLLP" "AMIGO1" "SBF2" "NKX6-2"
>
> Best,
>
> Jim
>
>
>>
>>
>>
>> Thanks,
>>
>>
>>
>> Hervé
>>
>>
>>
>>
>>
>> `·.¸¸.·´´¯``·.¸¸.·´´¯``·.¸¸.·´´¯``·.¸¸.·´´¯``·.¸¸.·´´¯``·.¸¸.·´´¯``·.¸¸.·´´¯``·.¸¸.·´´¯``·.¸¸.·´´¯``·.¸¸.·´
>>
>>
>> Hervé Lemaître
>>
>> U1000 "Imagerie et Psychiatrie"
>>
>> INSERM - CEA - Faculté de Médecine Paris Sud 11
>>
>> Service Hospitalier Frédéric Joliot
>>
>> 4, Place du Général Leclerc
>>
>> 91401 ORSAY, FRANCE
>>
>> Tél: (+33) 1 69 86 77 84
>>
>> Fax: (+33) 1 69 86 78 10
>>
>> `·.¸¸.·´´¯``·.¸¸.·´´¯``·.¸¸.·´´¯``·.¸¸.·´´¯``·.¸¸.·´´¯``·.¸¸.·´´¯``·.¸¸.·´´¯``·.¸¸.·´´¯``·.¸¸.·´´¯``·.¸¸.·´
>>
>>
>>
>>
>>
>>
>> [[alternative HTML version deleted]]
>>
>>
>>
>>
>> _______________________________________________ Bioconductor mailing
>> list Bioconductor at r-project.org
>> 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