topGO analysis "MF" term error
0
0
Entering edit mode
10 months ago
sim.j.baum ▴ 90

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

RNA-Seq R GO topGO • 390 views
ADD COMMENT
1
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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

ADD REPLY

Login before adding your answer.

Traffic: 1361 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6