[BioC] RE : RE : problem with makeGOGraph function

Samuel Rochette samuel.rochette.1 at ulaval.ca
Mon Mar 31 20:56:50 CEST 2014


Hi again James,

sorry for not giving you enough details. Here is an example of my problem (in this example, the only packages that are loaded in my session are GOstats and org.sc.sgd.db):

> entrez=as.vector(unlist(mget(hits.list[[3]]$sys,org.Sc.sgdENTREZID)))
> 
> entrez
 [1] "850504" "851623" "856145" "850508" "850508" "850508" "850508"
 [8] "853871" "852889" "854222" "854680" "852323" "851482" "851452"
[15] "851934" "851978" NA       "856920" "852726" "856415" "853082"
[22] "853393" "853516" "853746" "850744" "850995" "854896" NA      
[29] "854886" "854240" "854550" "856083" "856159"
> # this creates a vector with entrez gene ids, it contains NAs, I'll try to figure out later why it does that #
> 
> myFun <- function(x){
+ tmp <- mget(x, org.Sc.sgdGO, ifnotfound = NA)
+ names(tmp) <- NULL
+ unlist(tmp, recursive = FALSE)
+ }
> 
> #this is the function that you suggested
> 
> tree <- makeGOGraph(entrez[!is.na(entrez)], Ontology = "BP", removeRoot=FALSE,mapfun=myFun) # which gives the error message below:
Erreur dans newNodes[[i]] : indice hors limites


Samuel Rochette
étudiant à la maîtrise, laboratoire Landry, IBIS, Université Laval
(418)-656-2131 poste 5527
________________________________________
De : James W. MacDonald [jmacdon at uw.edu]
Date d'envoi : 30 mars 2014 12:29
À : Samuel Rochette
Cc : Samuel Rochette [guest]; bioconductor at r-project.org
Objet : Re: RE : [BioC] problem with makeGOGraph function

Hi Samuel,

If you want more help, you will have to supply us with a small, self
contained example that results in the error you see. When I tested the
suggested code below, it worked, so you must be doing something different.

Best,

Jim


On 3/30/2014 10:23 AM, Samuel Rochette wrote:
> Dear James,
>
> thank you very much for your help. Although your suggestion makes a lot of sense, it seems that there is still a problem. When I type the command line that you suggested, the following error message appears: "Erreur dans newNodes[[i]] : indice hors limites".
>
> Please let me know if you have any other suggestion.
>
> Best.
>
> Samuel Rochette
>
> ________________________________________
> De : James W. MacDonald [jmacdon at uw.edu]
> Date d'envoi : 27 mars 2014 18:17
> À : Samuel Rochette [guest]
> Cc : bioconductor at r-project.org; Samuel Rochette
> Objet : Re: [BioC] problem with makeGOGraph function
>
> Hi Samuel,
>
>
> On 3/27/2014 2:51 PM, Samuel Rochette [guest] wrote:
>> Hi,
>>
>> I wish to produce a directed acyclic graph of a gene enrichment analysis that I performed using R GOstats package. For this, I wanted to use the makeGOGraph function, but it seems that there is a problem when using the yeast data base package "org.Sc.sgd.db".
>>
>> Here is the command line:
>>
>>> tree <- makeGOGraph(hits.list[[1]]$sys, Ontology="BP", removeRoot=TRUE,chip="org.Sc.sgd.db")
>> where "hits.list[[1]]$sys" is a vector containing yeast genes.
>>
>>    -- output of sessionInfo():
>>
>> Here is the error message:
>>
>> "Erreur dans .get_eg_to_go_fun(mapfun, chip) :
>>     either mapfun or chip must be specified
>> De plus : Message d'avis :
>> objet 'org.Sc.sgdGO2PROBE' introuvable
>> DB-based version of  org.Sc.sgd.db  not found.
>> Reverting to use of environment-based GO"
>>
>> It seems that there is something missing in the org.Sc.sgd.db package but I could not find out what exactly.
> The problem here is that the function is really expecting that you are
> using a chip-level package, rather than an organism level package. So
> there is some functionality under the hood that tries to map chip probe
> IDs to the respective GO IDs. Since you aren't doing that, you have to
> supply a function that will do that for you.
>
> Try this and see if it helps
>
> myFun <- function(x){
> tmp <- mget(x, org.Sc.sgdGO, ifnotfound = NA)
> names(tmp) <- NULL
> unlist(tmp, recursive = FALSE)
> }
>
> tree <- makeGOGraphs(hits.list[[1]]$sys, Ontology = "BP", removeRoot =
> TRUE, mapfun = myFun)
>
> Best,
>
> Jim
>
>
>> Thank you for your help!
>>
>> --
>> Sent via the guest posting facility at bioconductor.org.
>>
>> _______________________________________________
>> 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
> --
> James W. MacDonald, M.S.
> Biostatistician
> University of Washington
> Environmental and Occupational Health Sciences
> 4225 Roosevelt Way NE, # 100
> Seattle WA 98105-6099
>

--
James W. MacDonald, M.S.
Biostatistician
University of Washington
Environmental and Occupational Health Sciences
4225 Roosevelt Way NE, # 100
Seattle WA 98105-6099



More information about the Bioconductor mailing list