Learn R Programming

randomGODB (version 1.1)

characterizeDB: characterizeDB

Description

compute distribution of GO category sizes, and fraction of a leaf's ancestors containing a bait gene

Usage

characterizeDB(
  GOGOA3,
  ontology = "biological_process",
  ngene = 2,
  GOBPCHILDREN,
  GOBPANCESTOR,
  hitters = "all",
  verbose = TRUE
)

Value

returns the sorted number of GO category sizes, and also has side effect of printing out some information

Arguments

GOGOA3

return value of minimalistGODB::buildGODatabase()

ontology

character c("biological_process","molecular_function","cellular_component")

ngene

integer number of genes to examine within range of 'hitters'

GOBPCHILDREN

GO.db data set

GOBPANCESTOR

GO.db data set

hitters

character c("big","mid","lo","all") designate which portion of gene table to look at

verbose

BOOLEAN if TRUE print out some information

Examples

Run this code
if (FALSE) {
# 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.
# This example is given in full detail in the package vignette.
# You can generate GOGOA3.RData using the package 'minimalistGODB'
# or you can retrieve it from https://github.com/barryzee/GO/databases
dir<-"/Users/barryzeeberg/personal/GODB_RDATA/goa_human/"
load(sprintf("%s/%s",dir,"GOGOA3_goa_human.RData"))
ontology<-"biological_process"
# t<-characterizeDB(GOGOA3,ontology,ngene=3,GO.db::GOBPCHILDREN,GO.db::GOBPANCESTOR,hitters="all")

if (requireNamespace("GO.db", quietly = TRUE)) {
 ch<-GO.db::GOBPCHILDREN
} else {
 stop("Install 'GO.db' from BioConductor to use this function.", call. = FALSE)
}

if (requireNamespace("GO.db", quietly = TRUE)) {
 GO.db::GOBPANCESTOR
} else {
 stop("Install 'GO.db' from BioConductor to use this function.", call. = FALSE)
}

t<-characterizeDB(GOGOA3,ontology,ngene=3,ch,an,hitters="all")
}

Run the code above in your browser using DataLab