1 / 7

Gene Ontology Enrichment Analysis code

Gene Ontology Enrichment Analysis code. By Thalia Lake. setwd ("/Users/ StarTCL /Documents/R") library(" org.Mm.eg.db ") library(" GOstats ") universe= read.csv (" universereal.txt",header = T,sep ='t') Touniverse = universe$To universestrings = as.character ( Touniverse )

zihna
Download Presentation

Gene Ontology Enrichment Analysis code

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Gene Ontology Enrichment Analysis code By Thalia Lake

  2. setwd("/Users/StarTCL/Documents/R") • library("org.Mm.eg.db") • library("GOstats") • universe=read.csv("universereal.txt",header=T,sep='\t') • Touniverse=universe$To • universestrings=as.character(Touniverse) • checkGO=mget(universestrings,org.Mm.egGO,ifnotfound=NA) • hasGO=checkGO[!is.na(checkGO)] • geneid=names(hasGO) • MmCutoff=0.05 • setwd("clusters")

  3. myFiles=list.files(pattern="EntrezCluster.*out$") • for(f in myFiles){ • cluster=read.table(f,header=T) • cluster=unlist(cluster) • cstrings=as.character(cluster) • checkGOc=mget(cstrings,org.Mm.egGO,ifnotfound=NA) • hasGOc=checkGOc[!is.na(checkGOc)] • geneidc=names(hasGOc) • settings=c("BP","MF","CC")

  4. for(s in settings){ • params=new("GOHyperGParams", • geneIds=geneidc, • universeGeneIds=geneid, • annotation="org.Mm.eg.db", • ontology=s, • pvalueCutoff=MmCutoff, • conditional=FALSE, • testDirection="over")

  5. paramsCond=new("GOHyperGParams", • geneIds=geneidc, • universeGeneIds=geneid, • annotation="org.Mm.eg.db", • ontology=s, • pvalueCutoff=MmCutoff, • conditional=TRUE, • testDirection="over")

  6. MmOver=hyperGTest(params) • MmCondOver=hyperGTest(paramsCond) • MmOver • MmCondOver • df=summary(MmOver) • names(df) • outputfile=sprintf("%s_%s.html", f, s) • htmlReport(MmCondOver,file=outputfile) • df[df$OddsRatio>2, ] • }}

  7. Example of output data • Gene to GO CC Conditional test for over-representation

More Related