[BioC] How to retrieve the GO identifier correctly?

Robert Gentleman rgentlem at jimmy.harvard.edu
Tue Oct 12 23:36:05 CEST 2004


On Tue, Oct 12, 2004 at 05:12:08PM -0400, szhan at uoguelph.ca wrote:
> Hello, Experts,
> I tried to retrieve all biological process GO terms at level 3 starting
> "biological process" as level 1 using the code as bellows:

  The difference is that the $ operator does not evaluate its
  arguments, so it does not do what you think it does in your line
  5. Use the [[ ]], version, which does evaluate its argument.

  Robert

  ps it is considered to be bad style to post the same request to more
  than one help list, and it is not helpful to put in line numbers as
  that makes cut and paste a pain.

> 
> 1 library(GO)
> 2 library(GOstats)
> 3 level2<-getGOChildren("GO:0008150")$"GO:0008150"$Children
> 4 for ( i in 1:length(level2)) {
> 5    level3 <- getGOChildren(level2[i])$level2[i]$Children
> 6    for ( j in 1:length(level3)){
> 7       level3term <- getGOTerm(as.character(level3[j]))$BP$level3[j]
> 8       level3term
> 9    }
> 10 }
> What is the difference between line 3 and line5? In the line 3 I retrieved the
> GO identifiers at level 2 successfullly but in the line 5 I got nothing. How to
> correct the line 5 to retrieve the GO terms at level 3 correctly?
> Thank you in advance!
> Josh
> 
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor

-- 
+---------------------------------------------------------------------------+
| Robert Gentleman                 phone : (617) 632-5250                   |
| Associate Professor              fax:   (617)  632-2444                   |
| Department of Biostatistics      office: M1B20                            |
| Harvard School of Public Health  email: rgentlem at jimmy.harvard.edu        |
+---------------------------------------------------------------------------+



More information about the Bioconductor mailing list