User Tools

Site Tools


mkatari-bioinformatics-august-2013-loadingphytozome

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
mkatari-bioinformatics-august-2013-loadingphytozome [2013/08/21 09:26] – created mkatarimkatari-bioinformatics-august-2013-loadingphytozome [2015/06/18 09:05] (current) – [Run Fisher Exact Test] mkatari
Line 5: Line 5:
 ===== Read Phytozome annotation file. ===== ===== 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.+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. Download the Arabidopsis annotation file here [[https://drive.google.com/file/d/0B172nc4dAaaOUUI1T2ZJamgtdlE/view?usp=sharing|here]]
 <code> <code>
-anno<-read.table("Mesculenta_147_annotation_info.txt", +anno<-read.table("Athaliana_167_TAIR10.annotation_info.txt", 
            header=FALSE,             header=FALSE, 
            sep="\t",             sep="\t", 
Line 22: Line 22:
 source("createGOdata.R") source("createGOdata.R")
 </code> </code>
 +
 +===== Run Fisher Exact Test =====
 +
 +Let's use the significant genes identified from Deseq as our example. [[https://drive.google.com/file/d/0B172nc4dAaaOM2hvSlZWNG10UW8/view?usp=sharing|resSig]]
 +
 +<code>
 +
 +gene.list<-read.table("resSig.txt", header=T)
 +
 +</code>
 +
 +Start by sourcing the [[https://drive.google.com/file/d/0B172nc4dAaaObThyRjlZT0xjRE0/view?usp=sharing|GoTermEnrichment.R]] script. The function itself is called doFisherTest. It has four arguments: gene.list, gene2go , go2gene, and goAnnot. The first is your list of genes. The next two use gene2go and go2gene as default but different lists can be provided here and the Last is an annotation file for the terms. Download  [[https://docs.google.com/a/nyu.edu/file/d/0B172nc4dAaaOWFVWdDdpcmxjamc/edit|goterm_annot]]
 +
 +To run the function:
 +<code>
 +source("GoTermEnrichment.R")
 +goterm_annot<-read.table("goterm_annot", sep="|", strip.white=TRUE, 
 +                          row.names=1, quote="")
 +goresults=doFisherTest(as.character(gene.list[,1]), goAnnot=goterm_annot)
 +write.table(goresults, "goresults.xls", col.names=NA, quote=F, sep="\t")
 +</code>
 +
 +Visualizing your results in the GO-term graph. Use the RamiGO package. Simply provide the GO terms that are enriched and the corresponding p-value for the go-terms. By default it will save a file to your working directory called RamiGO.png
 +
 +<code>
 +source("http://bioconductor.org/biocLite.R")
 +biocLite("RamiGO")
 +library(RamiGO)
 +getAmigoTree(rownames(gotermresults)[1:3], c("blue","red","green"),
 +             gotermresults$AdjPval[1:3])
 +</code>
 +
mkatari-bioinformatics-august-2013-loadingphytozome.1377077181.txt.gz · Last modified: 2013/08/21 09:26 by mkatari