| Title: | Three Dimensional High Throughput 'GoMiner' |
|---|---|
| Description: | The Gene Ontology (GO) Consortium <https://geneontology.org/> organizes genes into hierarchical categories based on biological process (BP), molecular function (MF) and cellular component (CC, i.e., subcellular localization). Tools such as 'GoMiner' (see Zeeberg, B.R., Feng, W., Wang, G. et al. (2003) <doi:10.1186/gb-2003-4-4-r28>) can leverage GO to perform ontological analysis of microarray and proteomics studies, typically generating a list of significant functional categories. To capture the benefit of all three ontologies, I developed 'HTGM3D', a three-dimensional version of 'GoMiner'. |
| Authors: | Barry Zeeberg [aut, cre] |
| Maintainer: | Barry Zeeberg <[email protected]> |
| License: | GPL (>= 2) |
| Version: | 1.0.3 |
| Built: | 2026-05-26 06:21:00 UTC |
| Source: | https://github.com/cran/HTGM3D |
set up color scale for black body spectrum
blackBodyRadiationColors(x, max_value = 1)blackBodyRadiationColors(x, max_value = 1)
x |
numeric should be between 0 (black) and 1 (white) |
max_value |
numeric maximum value to be used for scaling |
I obtained this by copy and paste from internet (reference unknown)
returns no value, but has side effect of generating color map
colors.blackBody <- rev(blackBodyRadiationColors(seq(0.3,1,length.out=20)))colors.blackBody <- rev(blackBodyRadiationColors(seq(0.3,1,length.out=20)))
assign the axis coordinate number to be used for the plotting position for each category
catNum3(l)catNum3(l)
l |
list each component corresponds to an ontology branch, and contains the decreasing sorted tabulation of output of the number of times that a category appears in a triplet |
a component of l is like: GO_0005515__protein_binding GO_0042802__identical_protein_binding GO_0005178__integrin_binding 38 4 3
#' a component of l1 is like: GO_0005515__protein_binding GO_0042802__identical_protein_binding GO_0005178__integrin_binding 1 2 3
returns a list each component corresponds to an ontology branch, and contains a vector of category plotting positions
#load("data/x_l.RData") catNum3(x_l)#load("data/x_l.RData") catNum3(x_l)
annotate a selected point in the 3d graphic
graphIt(mat3d, sp, w, r, verbose)graphIt(mat3d, sp, w, r, verbose)
mat3d |
component of HTGM3Ddriver() output list |
sp |
integer vector containing c(x,y,z) coordinated of point |
w |
integer line number within mat3d |
r |
numeric max value of x,y,z ranges |
verbose |
integer vector representing vprint classes |
returns no value, but has side effect of annotating the 3D graph
compute matrix to use as input to plot3d()
HTGM3D(dir, geneList, GOGOA3, thresh1, thresh3, mn, mx, pcgMN, pcgMX, verbose)HTGM3D(dir, geneList, GOGOA3, thresh1, thresh3, mn, mx, pcgMN, pcgMX, verbose)
dir |
character string full path name to the directory acting as result repository |
geneList |
character vector of user-supplied genes of interest |
GOGOA3 |
return value of subsetGOGOA() |
thresh1 |
numerical acceptance threshold for individual ontologies |
thresh3 |
numerical acceptance threshold for joint ontology |
mn |
integer min category size threshold passed to trimGOGOA3() |
mx |
integer max category size threshold passed to trimGOGOA3() |
pcgMN |
integer param passed to pruneCatGenes |
pcgMX |
integer param passed to pruneCatGenes |
verbose |
integer vector representing vprint classes |
returns matrix containing information that provides the input needed for running plot3d()
## Not run: # GOGOA3.RData is too large to include in the R package # so I need to load it from a file that is not in the package. # Since this is in a file in my own file system, I could not # include this as a regular example in the package. # you can generate it using the package 'minimalistGODB' # or you can retrieve it from https://github.com/barryzee/GO/tree/main/databases load("/Users/barryzeeberg/personal/GODB_RDATA/goa_human/GOGOA3_goa_human.RData") geneList<-cluster52 dir<-tempdir() mat3d<-HTGM3D(dir,geneList,GOGOA3,thresh1=3,thresh3=3,mn=2, mx=10000,pcgMN=2,pcgMX=200,verbose=1:5) ## End(Not run)## Not run: # GOGOA3.RData is too large to include in the R package # so I need to load it from a file that is not in the package. # Since this is in a file in my own file system, I could not # include this as a regular example in the package. # you can generate it using the package 'minimalistGODB' # or you can retrieve it from https://github.com/barryzee/GO/tree/main/databases load("/Users/barryzeeberg/personal/GODB_RDATA/goa_human/GOGOA3_goa_human.RData") geneList<-cluster52 dir<-tempdir() mat3d<-HTGM3D(dir,geneList,GOGOA3,thresh1=3,thresh3=3,mn=2, mx=10000,pcgMN=2,pcgMX=200,verbose=1:5) ## End(Not run)
driver to invoke HTGM3D()
HTGM3Ddriver( dir, geneList, GOGOA3, thresh1, thresh3, mn, mx, pcgMN, pcgMX, verbose )HTGM3Ddriver( dir, geneList, GOGOA3, thresh1, thresh3, mn, mx, pcgMN, pcgMX, verbose )
dir |
character string full path name to the directory acting as result repository |
geneList |
character vector of user-supplied genes of interest |
GOGOA3 |
return value of subsetGOGOA() |
thresh1 |
numerical acceptance threshold for individual ontologies |
thresh3 |
numerical acceptance threshold for joint ontology |
mn |
integer min category size threshold passed to trimGOGOA3() |
mx |
integer max category size threshold passed to trimGOGOA3() |
pcgMN |
integer param passed to pruneCatGenes |
pcgMX |
integer param passed to pruneCatGenes |
verbose |
integer vector representing vprint classes |
suggested standardized class codes for vprint() -1 = developer debugging only 0 = constitutively turned on 1 = help for new user 2 = follow progress of long computation 3 = primary results 4 = meta information (e.g. dims of a matrix before and after trimming) 5 = warnings 6 = errors
returns matrix containing information that provides the input needed for running plot3d()
## Not run: # GOGOA3.RData is too large to include in the R package # so I need to load it from a file that is not in the package. # Since this is in a file in my own file system, I could not # include this as a regular example in the package. # you can generate it using the package 'minimalistGODB' # or you can retrieve it from https://github.com/barryzee/GO/tree/main/databases load("/Users/barryzeeberg/personal/GODB_RDATA/goa_human/GOGOA3_goa_human.RData") geneList<-cluster52 dir<-tempdir() l3<-HTGM3Ddriver(dir,geneList,GOGOA3,thresh1=3,thresh3=3, mn=2,mx=20000,pcgMN=2,pcgMX=200,verbose=1:5) ## End(Not run)## Not run: # GOGOA3.RData is too large to include in the R package # so I need to load it from a file that is not in the package. # Since this is in a file in my own file system, I could not # include this as a regular example in the package. # you can generate it using the package 'minimalistGODB' # or you can retrieve it from https://github.com/barryzee/GO/tree/main/databases load("/Users/barryzeeberg/personal/GODB_RDATA/goa_human/GOGOA3_goa_human.RData") geneList<-cluster52 dir<-tempdir() l3<-HTGM3Ddriver(dir,geneList,GOGOA3,thresh1=3,thresh3=3, mn=2,mx=20000,pcgMN=2,pcgMX=200,verbose=1:5) ## End(Not run)
compute fraction of total genes in the entire ontology that map to each category, and insert column into matrix mat
insertCatSize(mat, GOGOA3)insertCatSize(mat, GOGOA3)
mat |
return value of Jaccard3() |
GOGOA3 |
return value of subsetGOGOA() |
returns augmented version of matrix mat
## Not run: # GOGOA3.RData is too large to include in the R package # so I need to load it from a file that is not in the package. # Since this is in a file in my own file system, I could not # include this as a regular example in the package. # you can generate it using the package 'minimalistGODB' # or you can retrieve it from https://github.com/barryzee/GO/tree/main/databases load("/Users/barryzeeberg/personal/GODB_RDATA/goa_human/GOGOA3_goa_human.RData") mat2<-insertCatSize(x_mat,GOGOA3) ## End(Not run)## Not run: # GOGOA3.RData is too large to include in the R package # so I need to load it from a file that is not in the package. # Since this is in a file in my own file system, I could not # include this as a regular example in the package. # you can generate it using the package 'minimalistGODB' # or you can retrieve it from https://github.com/barryzee/GO/tree/main/databases load("/Users/barryzeeberg/personal/GODB_RDATA/goa_human/GOGOA3_goa_human.RData") mat2<-insertCatSize(x_mat,GOGOA3) ## End(Not run)
rotate the 3d graph and/or select a point within the 3D graph, and annotate that point
interactWithGraph3D(mat3d, maxfract = 1, newWindow = TRUE, verbose = TRUE)interactWithGraph3D(mat3d, maxfract = 1, newWindow = TRUE, verbose = TRUE)
mat3d |
component of HTGM3Ddriver() output list |
maxfract |
numeric upper threshold for category size to display |
newWindow |
Boolean if TRUE open new window to avoid over writing current window |
verbose |
integer vector representing vprint classes |
returns -1 if OS is OSX 26.2 which has glitch with rgl package
if(interactive()){ interactWithGraph3D(x_mat3d) }if(interactive()){ interactWithGraph3D(x_mat3d) }
compute the number of genes in the intersection of categories from 3 ontology branches
Jaccard3(dir, m, thresh1 = 3, thresh3 = 3, verbose = 2)Jaccard3(dir, m, thresh1 = 3, thresh3 = 3, verbose = 2)
dir |
character string full path name to the directory acting as result repository |
m |
return value of pruneCatGenes() |
thresh1 |
parameter passed to Jaccard3() |
thresh3 |
parameter passed to Jaccard3() |
verbose |
integer vector representing vprint classes |
returns matrix tabulating genes in the intersection of categories from 3 ontology branches also has side effect of saving files containing those genes
#load("data/x_m11.RData") Jaccard3(tempdir(),x_m11,thresh1=3,thresh3=3,verbose=1:5)#load("data/x_m11.RData") Jaccard3(tempdir(),x_m11,thresh1=3,thresh3=3,verbose=1:5)
compute x,y,z coordinates for each triplet
plot3Dmat(mat, l)plot3Dmat(mat, l)
mat |
return value of HTGM3D() |
l |
return value of catNum3() |
augmented version of matrix containing x,y,z coordinates for each triplet
#load("data/x_mat.RData") #load("data/x_l.RData") p3<-plot3Dmat(x_mat,x_l)#load("data/x_mat.RData") #load("data/x_l.RData") p3<-plot3Dmat(x_mat,x_l)
eliminate those categories to which no genes map
pruneCatGenes(m, mn = 2, mx = 200)pruneCatGenes(m, mn = 2, mx = 200)
m |
the return value of catGenes() |
mn |
integer min category size threshold passed to trimGOGOA3() |
mx |
integer max category size threshold passed to trimGOGOA3() |
returns pruned version of matrix m
#load("data/x_cg.RData") m<-pruneCatGenes(x_cg,2,200)#load("data/x_cg.RData") m<-pruneCatGenes(x_cg,2,200)
open gene list in a textEdit window
showGenes(mat3d, w, range, npad)showGenes(mat3d, w, range, npad)
mat3d |
component of HTGM3Ddriver() output list |
w |
integer line number within mat3d |
range |
list of ranges |
npad |
integer number of blanks for padding |
returns no value, but has side effect of opening textEdit
retrieve submatrices of common rownames and colnames, and report differences
subMatDiffs(m1, m2, verbose = 3)subMatDiffs(m1, m2, verbose = 3)
m1 |
matrix |
m2 |
matrix |
verbose |
integer vector representing vprint classes |
compare submatrices of m1 and m2 that have common rownames and colnames
returns no values
rn<-c("a","b","c") cn<-c("a","b","c","d") m1<-matrix(1:12,nrow=length(rn),ncol=length(cn)) rownames(m1)<-rn colnames(m1)<-cn m2<-m1 subMatDiffs(m1,m2) m3<-m1 m3[1,1]<-0 m3[1,2]<-0 subMatDiffs(m1,m3) m4<-m3 colnames(m4)<-c("aa","b","c","d") subMatDiffs(m1,m4)rn<-c("a","b","c") cn<-c("a","b","c","d") m1<-matrix(1:12,nrow=length(rn),ncol=length(cn)) rownames(m1)<-rn colnames(m1)<-cn m2<-m1 subMatDiffs(m1,m2) m3<-m1 m3[1,1]<-0 m3[1,2]<-0 subMatDiffs(m1,m3) m4<-m3 colnames(m4)<-c("aa","b","c","d") subMatDiffs(m1,m4)
determine if host machine is running OSX Tahoe 26.2
whichOS()whichOS()
as of Feb 6 2026 Tahoe 26.2 does not interact properly with rgl Xwindows package
"BAD" Tahoe 26.2 or later, "OK" otherwise