This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Help! Gene Ontology Enrichment Analysis

Hi there, This is my first time doing GO enrichment and I am a little confused and could do with some help.

I'm doing a meta analysis of diff. tissues and now trying to do a GO analysis of the Fisher's findings.

I've found GoExpress and topGO as tools, but their instruction guides are a mystery to me. I am not sure what they want and they also ask for annotations, which is a little tricky in a meta analysis of different platforms?

For example, running the below gives me the error code "invalid genes selected".

DE_genes_CD <- subset(blood_sorted, Fishers.P.Value < 0.001)$Symbol
back_genes_idx <- genefinder(as.matrix(blood), as.character(DE_genes_CD),
                             method="manhattan", scale="none")

I'm sure I'm overlooking something or not approaching/understanding this the right way.

Any help/hints/code would be much appreciated!!!!

Many thanks!

ontology r goexpress topgo microarray

Please paste example data here (head or top 5 lines)

> all.genes <- sort(unique(as.character(blood_sorted$Symbol)))
> int.genes <- sample(x = all.genes, size = 1000)
> int.genes <- factor(as.integer(all.genes %in% int.genes))
> names(int.genes) = all.genes
> selGenes <- sample(ls(illuminaHumanv3GO))
> gene2GO <- lapply(mget(selGenes, envir = illuminaHumanv3GO), names)
> gene2GO[sapply(gene2GO, is.null)] <- NA
> go.obj <- new("topGOdata", ontology='BP'
+               , allGenes = int.genes
+               , annot = annFUN.gene2GO
+               , gene2GO = gene2GOID
+ )

Building most specific GOs .....
    ( 0 GO terms found. )

Build GO DAG topology ..........
    ( 0 GO terms and 0 relations. )
Error in if is.na(index) || index < 0 || index > length(nd)) stop("vertex is not in graph: ",  : 
  missing value where TRUE/FALSE needed

Here is the crude example R script that worked. Try looking at the structure of your object/df.

=========

library(Biobase)
data("geneData")
data=tail(geneData)
data
genes=c("31734_at","31738_at")
str(genes)
genefinder(data,genes, numResults=2, scale="none",  method="euclidean")

Result

===========

> genefinder(data,genes, numResults=2, scale="none",  method="euclidean")
[[1]]
[[1]]$indices
[1] 6 2

[[1]]$dists
[1] 545.1294 576.7866


[[2]]
[[2]]$indices
[1] 6 3

[[2]]$dists
[1] 274.8154 544.4757

==========

Hi there,

Does that work without the expression values?

You see, I'm working with already existing Fisher's P.values in a data.frame which I can easily change to a matrix, but I don't have expression values in there.

Thank you!

3 answers

You could use the OmicsBox Software (https://www.biobam.com/omicsbox/) to do Gene Ontology Enrichment Analysis. You can have a look at the user manual here for GSEA and the Fishers Exact Test here: http://manual.omicsbox.biobam.com/user-manual/module-functional-analysis/enrichment-analysis/

If you have the functional annotation (GO terms) for your species you just need a list of IDs you want to test for functional enrichment.

These OmicsBox video tutorials might help: GSEA: Fisher's Exact Test:

Have you tried blast2go?

No, but I was looking for a way to do this in R, not an outside software. Either way, thanks for suggesting!

If you have list of gene symbols, use this simple tool and has detailed instructions Gene Set Clustering based on Functional annotation (GeneSCF)

Log in to answer this question.