# A treemap R script produced by the REVIGO server at http://revigo.irb.hr/ # If you found REVIGO useful in your work, please cite the following reference: # Supek F et al. "REVIGO summarizes and visualizes long lists of Gene Ontology # terms" PLoS ONE 2011. doi:10.1371/journal.pone.0021800 # author: Anton Kratz , RIKEN Omics Science Center, Functional Genomics Technology Team, Japan # created: Fri, Nov 02, 2012 7:25:52 PM # last change: Fri, Nov 09, 2012 3:20:01 PM # ----------------------------------------------------------------------------- # If you don't have the treemap package installed, uncomment the following line: # install.packages( "treemap" ); library(treemap) # treemap package by Martijn Tennekes # Set the working directory if necessary # setwd("C:/Users/username/workingdir"); # -------------------------------------------------------------------------- # Here is your data from REVIGO. Scroll down for plot configuration options. revigo.names <- c("term_ID","description","freqInDbPercent","abslog10pvalue","uniqueness","dispensability","representative"); revigo.data <- rbind(c("GO:0015031","protein transport",1.831,8.8097,0.738,0.000,"protein transport"), c("GO:0055085","transmembrane transport",5.717,1.3978,0.673,0.519,"protein transport"), c("GO:0015992","proton transport",0.884,1.9643,0.737,0.343,"protein transport"), c("GO:0006818","hydrogen transport",0.884,2.0665,0.755,0.416,"protein transport"), c("GO:0034504","protein localization to nucleus",0.038,1.5869,0.682,0.647,"protein transport"), c("GO:0046907","intracellular transport",0.834,5.7721,0.662,0.341,"protein transport"), c("GO:0016192","vesicle-mediated transport",0.652,1.6003,0.853,0.332,"protein transport"), c("GO:0015931","nucleobase-containing compound transport",0.282,1.6600,0.826,0.562,"protein transport"), c("GO:0048193","Golgi vesicle transport",0.065,1.5403,0.702,0.683,"protein transport"), c("GO:0051056","regulation of small GTPase mediated signal transduction",0.194,7.6402,0.746,0.000,"regulation of small GTPase mediated signal transduction"), c("GO:0000278","mitotic cell cycle",0.115,1.6290,0.824,0.190,"regulation of small GTPase mediated signal transduction"), c("GO:0016265","death",0.544,2.1884,0.845,0.176,"regulation of small GTPase mediated signal transduction"), c("GO:0006796","phosphate-containing compound metabolic process",17.043,5.0491,0.725,0.468,"regulation of small GTPase mediated signal transduction"), c("GO:0034404","nucleobase-containing small molecule biosynthetic process",1.829,1.3402,0.730,0.589,"regulation of small GTPase mediated signal transduction"), c("GO:0043954","cellular component maintenance",0.005,2.0132,0.800,0.363,"regulation of small GTPase mediated signal transduction"), c("GO:0043933","macromolecular complex subunit organization",1.196,1.4125,0.867,0.602,"regulation of small GTPase mediated signal transduction"), c("GO:0016042","lipid catabolic process",0.183,1.5435,0.795,0.619,"regulation of small GTPase mediated signal transduction"), c("GO:0022613","ribonucleoprotein complex biogenesis",0.964,1.7790,0.874,0.479,"regulation of small GTPase mediated signal transduction"), c("GO:0008203","cholesterol metabolic process",0.012,1.5944,0.852,0.495,"regulation of small GTPase mediated signal transduction"), c("GO:0016310","phosphorylation",7.355,5.0128,0.751,0.664,"regulation of small GTPase mediated signal transduction"), c("GO:0006119","oxidative phosphorylation",2.227,1.7765,0.780,0.586,"regulation of small GTPase mediated signal transduction"), c("GO:0034330","cell junction organization",0.018,1.7900,0.785,0.395,"regulation of small GTPase mediated signal transduction"), c("GO:0016579","protein deubiquitination",0.008,1.3534,0.866,0.679,"regulation of small GTPase mediated signal transduction"), c("GO:0016568","chromatin modification",0.118,2.2547,0.740,0.191,"regulation of small GTPase mediated signal transduction"), c("GO:0009057","macromolecule catabolic process",1.249,2.0717,0.820,0.432,"regulation of small GTPase mediated signal transduction"), c("GO:0006644","phospholipid metabolic process",1.043,2.5313,0.718,0.365,"regulation of small GTPase mediated signal transduction"), c("GO:0007049","cell cycle",1.307,2.7314,0.789,0.234,"regulation of small GTPase mediated signal transduction"), c("GO:0070646","protein modification by small protein removal",0.010,1.3534,0.864,0.500,"regulation of small GTPase mediated signal transduction"), c("GO:0008219","cell death",0.543,2.1122,0.779,0.259,"regulation of small GTPase mediated signal transduction"), c("GO:0051301","cell division",1.163,1.8499,0.791,0.282,"regulation of small GTPase mediated signal transduction"), c("GO:0006650","glycerophospholipid metabolic process",0.354,1.7988,0.743,0.698,"regulation of small GTPase mediated signal transduction"), c("GO:0045494","photoreceptor cell maintenance",0.003,1.7900,0.799,0.353,"regulation of small GTPase mediated signal transduction"), c("GO:0006412","translation",5.031,2.2889,0.771,0.584,"regulation of small GTPase mediated signal transduction"), c("GO:0009894","regulation of catabolic process",0.220,1.8695,0.853,0.354,"regulation of small GTPase mediated signal transduction"), c("GO:0007017","microtubule-based process",0.294,2.4814,0.812,0.244,"regulation of small GTPase mediated signal transduction"), c("GO:0007018","microtubule-based movement",0.101,1.3743,0.814,0.189,"regulation of small GTPase mediated signal transduction"), c("GO:0006413","translational initiation",0.318,1.5936,0.691,0.426,"regulation of small GTPase mediated signal transduction"), c("GO:0043087","regulation of GTPase activity",0.134,3.5086,0.630,0.255,"regulation of small GTPase mediated signal transduction"), c("GO:0009145","purine nucleoside triphosphate biosynthetic process",0.656,1.9865,0.662,0.693,"regulation of small GTPase mediated signal transduction"), c("GO:0001701","in utero embryonic development",0.046,1.5637,0.863,0.472,"regulation of small GTPase mediated signal transduction"), c("GO:0009142","nucleoside triphosphate biosynthetic process",0.832,2.0761,0.672,0.699,"regulation of small GTPase mediated signal transduction"), c("GO:0034622","cellular macromolecular complex assembly",0.705,1.7752,0.862,0.686,"regulation of small GTPase mediated signal transduction"), c("GO:0006468","protein phosphorylation",1.169,3.5017,0.706,0.265,"regulation of small GTPase mediated signal transduction"), c("GO:0006511","ubiquitin-dependent protein catabolic process",0.184,3.3279,0.733,0.404,"regulation of small GTPase mediated signal transduction"), c("GO:0007163","establishment or maintenance of cell polarity",0.021,1.5307,0.842,0.168,"regulation of small GTPase mediated signal transduction"), c("GO:0046034","ATP metabolic process",3.512,2.5456,0.638,0.583,"regulation of small GTPase mediated signal transduction"), c("GO:0006396","RNA processing",2.803,4.7447,0.793,0.021,"RNA processing"), c("GO:0016071","mRNA metabolic process",0.651,4.6882,0.823,0.388,"RNA processing"), c("GO:0008380","RNA splicing",0.164,2.7867,0.828,0.597,"RNA processing"), c("GO:0006397","mRNA processing",0.542,3.3261,0.812,0.380,"RNA processing"), c("GO:0000375","RNA splicing, via transesterification reactions",0.051,1.3166,0.842,0.543,"RNA processing"), c("GO:0034654","nucleobase-containing compound biosynthetic process",13.535,1.3402,0.770,0.302,"RNA processing"), c("GO:0009311","oligosaccharide metabolic process",0.473,1.3715,0.930,0.068,"oligosaccharide metabolism"), c("GO:0006793","phosphorus metabolic process",17.247,4.7747,0.900,0.090,"phosphorus metabolism"), c("GO:0006091","generation of precursor metabolites and energy",5.328,3.2612,0.911,0.102,"phosphorus metabolism")); stuff <- data.frame(revigo.data); names(stuff) <- revigo.names; stuff$abslog10pvalue <- as.numeric( as.character(stuff$abslog10pvalue) ); stuff$freqInDbPercent <- as.numeric( as.character(stuff$freqInDbPercent) ); stuff$uniqueness <- as.numeric( as.character(stuff$uniqueness) ); stuff$dispensability <- as.numeric( as.character(stuff$dispensability) ); # by default, outputs to a PDF file pdf( file="revigo_treemap.pdf", width=16, height=9 ) # width and height are in inches # check the tmPlot command documentation for all possible parameters - there are a lot more tmPlot( stuff, index = c("representative","description"), vSize = "abslog10pvalue", type = "categorical", vColor = "representative", title = "REVIGO Gene Ontology treemap", inflate.labels = FALSE, # set this to TRUE for space-filling group labels - good for posters lowerbound.cex.labels = 0, # try to draw as many labels as possible (still, some small squares may not get a label) bg.labels = "#CCCCCCAA", # define background color of group labels # "#CCCCCC00" is fully transparent, "#CCCCCCAA" is semi-transparent grey, NA is opaque position.legend = "none" ) dev.off()