univ <- as.numeric(finTab$day7) # fintab is a table with logical
character(True/False) of all the genes, the significant genes from
DEanalysis are marked with True, otherwise false; day7 is one of the samples

univ <- as.factor(univ)

names(univ) <- finTab$gene_id

head(univ)


# make topGOdata object

day7GOdata <- new("topGOdata",

                  description = "Day 7 DE genes: Wt vs. Mut",

                  ontology = "BP",

                  allGenes = univ,

                  nodeSize=10,

                  annot = annFUN.org, mapping="org.Dm.eg <http://org.dm.eg/>
")

resFisher <- runTest(day7GOdata, alogorithm="classic", statistic="fisher")

allRes <- GenTable(day7GOdata, classicFisher=resFisher, topNodes=20)

*> goID <- allResD7inf[1,"GO:0050878"]  #purpose is to check the
significant genes associate with the GO term 0050878*
*> gt <- printGenes(day7infGOdata, whichTerms=goID, chip="org.Dm.eg
<http://org.dm.eg/>", numChar=40)*

*The error message is :*
Error in (function (classes, fdef, mtable)  :
  unable to find an inherited method for function 'printGenes' for
signature '"topGOdata", "NULL", "missing"'
>


SessionInfo()

R version 3.0.2 (2013-09-25)
Platform: x86_64-apple-darwin10.8.0 (64-bit)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] parallel  stats     graphics  grDevices utils     datasets  methods
base

other attached packages:
 [1] gplots_2.12.1         topGO_2.14.0          SparseM_1.03
 GO.db_2.10.1          graph_1.40.1          org.Dm.eg.db_2.10.1
 [7] RSQLite_0.11.4        DBI_0.2-7             AnnotationDbi_1.24.0
 Biobase_2.22.0        BiocGenerics_0.8.0    matrixStats_0.8.14
[13] cbcbSEQ_0.9.1         sva_3.8.0             mgcv_1.7-28
nlme_3.1-113          preprocessCore_1.24.0 corpcor_1.6.6
[19] limma_3.18.13

loaded via a namespace (and not attached):
 [1] bitops_1.0-6       caTools_1.16       gdata_2.13.2       grid_3.0.2
      gtools_3.3.0       IRanges_1.20.6     KernSmooth_2.23-10
 [8] lattice_0.20-24    Matrix_1.1-2       R.methodsS3_1.6.1  stats4_3.0.2
      tools_3.0.2
>


On Tue, Mar 18, 2014 at 4:12 PM, Dan Tenenbaum <dtenenba@fhcrc.org> wrote:

> Hi Qian,
>
> Please keep the Bioconductor list in the loop (hit Reply All) that way we
> can all teach and learn.
>
> For best results, you need to provide all the code necessary to reproduce
> the problem. You haven't done that below, because we still don't know what
> finTab and day7 are.
>
> Also, please run the function
> sessionInfo()
>
> ...after you get your error, and then paste its output into your email.
> This tells us about your operating system, R version, and version of
> packages loaded, which can help us figure out what the problem is. This is
> what my sessionInfo() looks like:
>
> > sessionInfo()
> R Under development (unstable) (2013-10-12 r64048)
> Platform: x86_64-apple-darwin10.8.0 (64-bit)
>
> locale:
> [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
>
> attached base packages:
> [1] parallel  stats     graphics  grDevices utils     datasets  methods
> [8] base
>
> other attached packages:
>  [1] topGO_2.15.2          SparseM_1.03          GO.db_2.10.1
>  [4] RSQLite_0.11.4        DBI_0.2-7             AnnotationDbi_1.25.15
>  [7] GenomeInfoDb_0.99.19  Biobase_2.23.6        BiocGenerics_0.9.3
> [10] graph_1.41.3
>
> loaded via a namespace (and not attached):
> [1] grid_3.1.0      IRanges_1.21.34 lattice_0.20-27 stats4_3.1.0
> [5] tools_3.1.0
>
> Thanks,
> Dan
>
>
> ----- Original Message -----
> > From: "Qian Wang" <qian.wang725@gmail.com>
> > To: "Dan Tenenbaum" <dtenenba@fhcrc.org>
> > Sent: Tuesday, March 18, 2014 4:06:17 PM
> > Subject: Re: [BioC] TopGo package
> >
> >
> >
> >
> > univ <- as.numeric( finTab $ day7 )
> >
> > univ <- as.factor( univ )
> >
> > names( univ ) <- finTab $ gene_id
> >
> > head( univ )
> >
> >
> >
> >
> > # make topGOdata object
> >
> > day7GOdata <- new( "topGOdata" ,
> >
> > description = "Day 7 DE genes: Wt vs. Mut" ,
> >
> > ontology = "BP" ,
> >
> > allGenes = univ ,
> >
> > nodeSize = 10 ,
> >
> > annot = annFUN.org , mapping = " org.Dm.eg " )
> >
> > resFisher <- runTest( day7GOdata , alogorithm = "classic" , statistic
> > = "fisher" )
> >
> > allRes <- GenTable( day7GOdata , classicFisher = resFisher , topNodes
> > = 20 )
> >
> > par( fig =c( 0 , 1 , 0 , 1 ), mar =c( 3 , 5 , 2 , 0.5 ))
> >
> >
> >
> >
> > this is the GO analysis Code. Not sure whether answers your
> > questions. I am new to R.
> >
> >
> > Thanks.
> > Q
> >
> >
> >
> > On Tue, Mar 18, 2014 at 3:30 PM, Dan Tenenbaum < dtenenba@fhcrc.org >
> > wrote:
> >
> >
> >
> >
> >
> > ----- Original Message -----
> > > From: "Qian Wang" < qian.wang725@gmail.com >
> > > To: bioconductor@r-project.org
> > > Sent: Tuesday, March 18, 2014 12:59:53 PM
> > > Subject: [BioC] TopGo package
> > >
> > > Hi,
> > >
> > > I am using TopGo for my gene ontology analysis of the RNA-seq
> > > data.I
> > > am able to get the top lists of GO terms. But I also want to print
> > > out the significant genes associated with a particular GO term. I
> > > am
> > > using printGenes.
> > >
> > >
> > >
> > > day7infGOdata <- new("topGOdata",
> > > description = "Day 7 inf DE genes: DXV vs. PBS",
> > > ontology = "BP",
> > > allGenes = univ,
> > > nodeSize=10,
> > > annot = annFUN.org, mapping=" org.Dm.eg ")
> >
> > What's the value of univ? And what is the output of
> >
> > sessionInfo()
> >
> > ?
> >
> > Dan
> >
> >
> >
> > > resFisherD7inf <- runTest(day7infGOdata, alogorithm="classic",
> > > statistic="fisher")
> > > allResD7inf <- GenTable(day7infGOdata,
> > > classicFisher=resFisherD7inf,
> > > topNodes=20)
> > >
> > >
> > > > goID <- allResD7inf[1,"GO:0050878"]
> > > > gt <- printGenes(day7infGOdata, whichTerms=goID, chip=" org.Dm.eg
> > > > ",
> > > > numChar=40)
> > >
> > > The error message is :
> > > Error in (function (classes, fdef, mtable) :
> > > unable to find an inherited method for function 'printGenes' for
> > > signature '"topGOdata", "NULL", "missing"'
> > > >
> > >
> > > Can anybody help me?
> > >
> > > Thanks.
> > > Q
> > > [[alternative HTML version deleted]]
> > >
> > >
> > > _______________________________________________
> > > Bioconductor mailing list
> > > Bioconductor@r-project.org
> > > https://stat.ethz.ch/mailman/listinfo/bioconductor
> > > Search the archives:
> > > http://news.gmane.org/gmane.science.biology.informatics.conductor
> >
> >
> >
> >
> > --
> > Regards,
> >
> > Qian Wang
>



-- 
Regards,

Qian Wang

	[[alternative HTML version deleted]]

