Version: 1.0
Date: 2025-05-27
Title: Three Dimensional High Throughput 'GoMiner'
Maintainer: Barry Zeeberg <barryz2013@gmail.com>
Author: Barry Zeeberg [aut, cre]
Depends: R (≥ 4.2.0)
Imports: minimalistGODB, GoMiner, HTGM, HTGM2D, grDevices, stats, R2HTML, rgl, vprint, randomGODB, stringr
LazyData: true
LazyDataCompression: xz
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'.
License: GPL-2 | GPL-3 [expanded from: GPL (≥ 2)]
Encoding: UTF-8
VignetteBuilder: knitr
Suggests: knitr, rmarkdown, testthat (≥ 3.0.0)
RoxygenNote: 7.3.2
Config/testthat/edition: 3
NeedsCompilation: no
Packaged: 2025-05-28 03:29:58 UTC; barryzeeberg
Repository: CRAN
Date/Publication: 2025-05-30 09:10:05 UTC

HTGM3D

Description

compute matrix to use as input to plot3d()

Usage

HTGM3D(dir, geneList, GOGOA3, thresh1, thresh3, mn, mx, pcgMN, pcgMX, verbose)

Arguments

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

Value

returns matrix containing information that provides the input needed for running plot3d()

Examples

## 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)


HTGM3Ddriver

Description

driver to invoke HTGM3D()

Usage

HTGM3Ddriver(
  dir,
  geneList,
  GOGOA3,
  thresh1,
  thresh3,
  mn,
  mx,
  pcgMN,
  pcgMX,
  verbose
)

Arguments

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

Details

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

Value

returns matrix containing information that provides the input needed for running plot3d()

Examples

## 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")

#load("data/cluster52.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)


HTGM3D data set

Description

HTGM3D data set

Usage

data(Housekeeping_Genes)

Jaccard3

Description

compute the number of genes in the intersection of categories from 3 ontology branches

Usage

Jaccard3(dir, m, thresh1 = 3, thresh3 = 3, verbose = 2)

Arguments

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

Value

returns matrix tabulating genes in the intersection of categories from 3 ontology branches also has side effect of saving files containing those genes

Examples

#load("data/x_m11.RData")
Jaccard3(tempdir(),x_m11,thresh1=3,thresh3=3,verbose=1:5)


blackBodyRadiationColors

Description

set up color scale for black body spectrum

Usage

blackBodyRadiationColors(x, max_value = 1)

Arguments

x

numeric should be between 0 (black) and 1 (white)

max_value

numeric maximum value to be used for scaling

Details

I obtained this by copy and paste from internet (reference unknown)

Value

returns no value, but has side effect of generating color map

Examples

colors.blackBody <- rev(blackBodyRadiationColors(seq(0.3,1,length.out=20)))


catNum3

Description

assign the axis coordinate number to be used for the plotting position for each category

Usage

catNum3(l)

Arguments

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

Details

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

Value

returns a list each component corresponds to an ontology branch, and contains a vector of category plotting positions

Examples

#load("data/x_l.RData")
catNum3(x_l)


HTGM3D data set

Description

HTGM3D data set

Usage

data(cluster52)

graphIt

Description

annotate a selected point in the 3d graphic

Usage

graphIt(mat3d, sp, w, r, verbose)

Arguments

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

Value

returns no value, but has side effect of annotating the 3D graph


insertCatSize

Description

compute fraction of total genes in the entire ontology that map to each category, and insert column into matrix mat

Usage

insertCatSize(mat, GOGOA3)

Arguments

mat

return value of Jaccard3()

GOGOA3

return value of subsetGOGOA()

Value

returns augmented version of matrix mat

Examples

## 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)


interactWithGraph3D

Description

rotate the 3d graph and/or select a point within the 3D graph, and annotate that point

Usage

interactWithGraph3D(mat3d, maxfract = 1, newWindow = TRUE, verbose = TRUE)

Arguments

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

Value

returns no value, but has side effect of annotating the 3D graph

Examples

if(interactive()){
#load("data/x_mat3d.RData")
interactWithGraph3D(x_mat3d)
}


plot3Dmat

Description

compute x,y,z coordinates for each triplet

Usage

plot3Dmat(mat, l)

Arguments

mat

return value of HTGM3D()

l

return value of catNum3()

Value

augmented version of matrix containing x,y,z coordinates for each triplet

Examples

#load("data/x_mat.RData")
#load("data/x_l.RData")
p3<-plot3Dmat(x_mat,x_l)


pruneCatGenes

Description

eliminate those categories to which no genes map

Usage

pruneCatGenes(m, mn = 2, mx = 200)

Arguments

m

the return value of catGenes()

mn

integer min category size threshold passed to trimGOGOA3()

mx

integer max category size threshold passed to trimGOGOA3()

Value

returns pruned version of matrix m

Examples

#load("data/x_cg.RData")
m<-pruneCatGenes(x_cg,2,200)


showGenes

Description

open gene list in a textEdit window

Usage

showGenes(mat3d, w, range, npad)

Arguments

mat3d

component of HTGM3Ddriver() output list

w

integer line number within mat3d

range

list of ranges

npad

integer number of blanks for padding

Value

returns no value, but has side effect of opening textEdit


subMatDiffs

Description

retrieve submatrices of common rownames and colnames, and report differences

Usage

subMatDiffs(m1, m2, verbose = 3)

Arguments

m1

matrix

m2

matrix

verbose

integer vector representing vprint classes

Details

compare submatrices of m1 and m2 that have common rownames and colnames

Value

returns no values

Examples

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)


HTGM3D data set

Description

HTGM3D data set

Usage

data(x_cg)

HTGM3D data set

Description

HTGM3D data set

Usage

data(x_l)

HTGM3D data set

Description

HTGM3D data set

Usage

data(x_m11)

HTGM3D data set

Description

HTGM3D

Usage

data(x_mat)

HTGM3D data set

Description

HTGM3D

Usage

data(x_mat3d)