This is an old revision of the document!
Table of Contents
Back to Manny's Bioinformatics Workshop Home
Loading Phytozome Annotations
Read Phytozome annotation file.
This step was tricky because there were characters such as quotes and hash marks. We need to reset the default values to allow the file to load without a problem.
anno<-read.table("Mesculenta_147_annotation_info.txt", header=FALSE, sep="\t", quote="", comment.char="")
Creating GO objects for fisher test
First create a new data frame with only gene name and go-ids. Then simply source the createGOdata.R script. Make sure you put the script in your working directory before you source it. This will create two different lists in your workspace: go2gene and gene2go
justGeneGo<-anno[,c(2,10)] source("createGOdata.R")
Run Fisher Exact Test
Start by sourcing the GOTermEnrichment.R script. If you do not have a sample gene list to work with, simply create a random one.
gene.list<-names(gene2go)[sample(1:length(names(gene2go)), 500)]
The function itself is called doFisherTest. It has three arguments: gene.list, gene2go , and go2gene. The last two use gene2go and go2gene as default but different lists can be provided here.
To run the function:
goresults=doFisherTest(gene.list)