Question: topGO analysis "MF" term error
0
gravatar for sim.j.baum
5 weeks ago by
sim.j.baum50
sim.j.baum50 wrote:

Hi all,
I am using topGO in R to get GO terms from a set of genes (in rat organism). I am mainly following the workflow described here: http://bioconductor.org/packages/release/bioc/vignettes/topGO/inst/doc/topGO.pdf

example of some entries in my gene list:
int.genes_2:

Sap25: 0 Sap30: 0 Sap30bp: 0 Sap30l: 1 Sapcd1: 0 Levels: '0''1'



GOdata <- new("topGOdata", 
          ontology = "MF", 
          allGenes = int.genes_2,
          nodeSize = 10,
          annot = annFUN.org, #  annFUN.gene2GO
          mapping = "org.Rn.eg.db",  # human org.Hs.eg.db # rat org.Rn.eg.db
          ID = "symbol")



GOdata

output:

------------------------- topGOdata object -------------------------

Description: -

Ontology: - MF

19492 available genes (all genes from the array): - symbol: 1700020D05Rik 1700020N01Rik 1700066B19Rik 1700092M07Rik 4933416C03Rik ... - 719 significant genes.

15 feasible genes (genes that can be used in the analysis): - symbol: C3 C5 C6 F10 F11 ... - 1 significant genes.

GO graph (nodes with at least 10 genes): - a graph with directed edges - number of nodes = 4 - number of edges = 3

------------------------- topGOdata object -------------------------

resultKS <- runTest(sampleGOdata, algorithm = "classic", statistic = "ks")
resultFisher <- runTest(GOdata, algorithm = "classic", statistic = "fisher")
resultKS.elim <- runTest(sampleGOdata, algorithm = "elim", statistic = "ks")

and here comes the error when running the summary table:

allRes <- GenTable(sampleGOdata, classicFisher = resultFisher,
               classicKS = resultKS, elimKS = resultKS.elim,
               orderBy = "elimKS", ranksOf = "classicFisher", topNodes = 10)

Warning message in .genesInNode(graph(object), whichGO): “Nodes not present in the graph:GO:0003674GO:0005488GO:0005515GO:0043167NANANANANANA” Error in anno * expect: non-numeric argument to binary operator Traceback:

  1. GenTable(sampleGOdata, classicFisher = resultFisher, classicKS = resultKS, . elimKS = resultKS.elim, orderBy = "elimKS", ranksOf = "classicFisher", . topNodes = 10)
  2. GenTable(sampleGOdata, classicFisher = resultFisher, classicKS = resultKS, . elimKS = resultKS.elim, orderBy = "elimKS", ranksOf = "classicFisher", . topNodes = 10)
  3. .local(object, ...)
  4. termStat(object, whichTerms)
  5. termStat(object, whichTerms)

There are several NANANANA in the GO term list.

I dont get an error if I use "BP" in the lines above:

GOdata <- new("topGOdata", 
          ontology = "BP", 
          allGenes = int.genes_2,
          nodeSize = 10,
          annot = annFUN.org, #  annFUN.gene2GO
          mapping = "org.Rn.eg.db",  # human org.Hs.eg.db # rat org.Rn.eg.db
          ID = "symbol")

I would like to run the
CC (Cellular_Component) and MF (Molecular Function) terms as well.

Ideas and help very much appreciated,

Simon

go rna-seq topgo R • 108 views
ADD COMMENTlink written 5 weeks ago by sim.j.baum50
1

Which version of R and Bioconductor are you using? Which is the version of org.Rn.eg.db ? I think there was some trouble on the latest release with the GO.db package and they updated it. Check if you need to update, otherwise the code looks good and should work imho.

ADD REPLYlink written 5 weeks ago by Lluís R.900

Thank you Lluis, it was very silly, it is a miss assignment of a variable. I used the GOdata variable to calculate the GO terms values, but used another variable (sampleGOdata) later. From this I got the error. Should I delete this post?

ADD REPLYlink written 5 weeks ago by sim.j.baum50

Great that it was easy to solve. No, don't delete it, you might help future reader who has the same problem

ADD REPLYlink written 5 weeks ago by Lluís R.900
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1550 users visited in the last hour