Last data update: 2014.03.03

R: Class '"catDB"'
catDB-classR Documentation

Class "catDB"

Description

Container for storing mappings of genes to annotation categories such as gene ontologies (GO), pathways or conserved sequence domains. The catmap slot stores a list of data.frames providing the direct assignments of genes to annotation categories (e.g. gene-to-GO mappings); catlist is a list of lists of all direct and indirect associations to the annotation categories (e.g. genes mapped to a pathway); and idconv allows to store a lookup-table for converting identifiers (e.g. array feature ids to gene ids).

Objects from the Class

Objects can be created by calls of the form new("catDB", ...).

Slots

catmap:

Object of class "list" list of data.frames

catlist:

Object of class "list" list of lists

idconv:

Object of class "ANY" list of data.frames

Methods

catlist

signature(x = "catDB"): extracts data from catlist slot

catmap

signature(x = "catDB"): extracts data from catmap slot

coerce

signature(from = "list", to = "catDB"): as(list, "catDB")

idconv

signature(x = "catDB"): extracts data from idconv slot

names

signature(x = "catDB"): extracts slot names

show

signature(object = "catDB"): summary view of catDB objects

Author(s)

Thomas Girke

See Also

makeCATdb, GOHyperGAll, GOHyperGAll_Subset, GOHyperGAll_Simplify, GOCluster_Report, goBarplot

Examples

showClass("catDB")
## Not run: 
## Obtain annotations from BioMart
listMarts() # To choose BioMart database
m <- useMart("ENSEMBL_MART_PLANT"); listDatasets(m) 
m <- useMart("ENSEMBL_MART_PLANT", dataset="athaliana_eg_gene")
listAttributes(m) # Choose data types you want to download
go <- getBM(attributes=c("go_accession", "tair_locus", "go_namespace_1003"), mart=m)
go <- go[go[,3]!="",]; go[,3] <- as.character(go[,3])
write.table(go, "GOannotationsBiomart_mod.txt", quote=FALSE, row.names=FALSE, col.names=FALSE, sep="\t")

## Create catDB instance (takes a while but needs to be done only once)
catdb <- makeCATdb(myfile="GOannotationsBiomart_mod.txt", lib=NULL, org="", colno=c(1,2,3), idconv=NULL)
catdb

## End(Not run)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(systemPipeR)
Loading required package: Rsamtools
Loading required package: GenomeInfoDb
Loading required package: stats4
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
    get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
    match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
    rbind, rownames, sapply, setdiff, sort, table, tapply, union,
    unique, unsplit

Loading required package: S4Vectors

Attaching package: 'S4Vectors'

The following objects are masked from 'package:base':

    colMeans, colSums, expand.grid, rowMeans, rowSums

Loading required package: IRanges
Loading required package: GenomicRanges
Loading required package: Biostrings
Loading required package: XVector
Loading required package: ShortRead
Loading required package: BiocParallel
Loading required package: GenomicAlignments
Loading required package: SummarizedExperiment
Loading required package: Biobase
Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.


> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/systemPipeR/catDB-class.Rd_%03d_medium.png", width=480, height=480)
> ### Name: catDB-class
> ### Title: Class '"catDB"'
> ### Aliases: catDB-class catlist,catDB-method catmap,catDB-method
> ###   coerce,list,catDB-method idconv,catDB-method names,catDB-method
> ###   show,catDB-method
> ### Keywords: classes
> 
> ### ** Examples
> 
> showClass("catDB")
Class "catDB" [package "systemPipeR"]

Slots:
                              
Name:   catmap catlist  idconv
Class:    list    list     ANY
> ## Not run: 
> ##D ## Obtain annotations from BioMart
> ##D listMarts() # To choose BioMart database
> ##D m <- useMart("ENSEMBL_MART_PLANT"); listDatasets(m) 
> ##D m <- useMart("ENSEMBL_MART_PLANT", dataset="athaliana_eg_gene")
> ##D listAttributes(m) # Choose data types you want to download
> ##D go <- getBM(attributes=c("go_accession", "tair_locus", "go_namespace_1003"), mart=m)
> ##D go <- go[go[,3]!="",]; go[,3] <- as.character(go[,3])
> ##D write.table(go, "GOannotationsBiomart_mod.txt", quote=FALSE, row.names=FALSE, col.names=FALSE, sep="\t")
> ##D 
> ##D ## Create catDB instance (takes a while but needs to be done only once)
> ##D catdb <- makeCATdb(myfile="GOannotationsBiomart_mod.txt", lib=NULL, org="", colno=c(1,2,3), idconv=NULL)
> ##D catdb
> ## End(Not run)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>