Last data update: 2014.03.03

R: Number of mapped keys for the maps in package GO.db
GOMAPCOUNTSR Documentation

Number of mapped keys for the maps in package GO.db

Description

GOMAPCOUNTS provides the "map count" (i.e. the count of mapped keys) for each map in package GO.db.

Details

This "map count" information is precalculated and stored in the package annotation DB. This allows some quality control and is used by the checkMAPCOUNTS function defined in AnnotationDbi to compare and validate different methods (like count.mappedkeys(x) or sum(!is.na(as.list(x)))) for getting the "map count" of a given map.

See Also

  • mappedkeys,

  • count.mappedkeys,

  • checkMAPCOUNTS

  • AnnotationDb-class for use of the select() interface.

Examples

## select() interface:
## Objects in this package can be accessed using the select() interface
## from the AnnotationDbi package. See ?select for details.

## Bimap interface:
GOMAPCOUNTS
mapnames <- names(GOMAPCOUNTS)
GOMAPCOUNTS[mapnames[1]]
x <- get(mapnames[1])
sum(!is.na(as.list(x)))
count.mappedkeys(x)   # much faster!

## Check the "map count" of all the maps in package GO.db
checkMAPCOUNTS("GO.db")

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(GO.db)
Loading required package: AnnotationDbi
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: Biobase
Welcome to Bioconductor

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

Loading required package: IRanges
Loading required package: S4Vectors

Attaching package: 'S4Vectors'

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

    colMeans, colSums, expand.grid, rowMeans, rowSums


> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/GO.db/GOMAPCOUNTS.Rd_%03d_medium.png", width=480, height=480)
> ### Name: GOMAPCOUNTS
> ### Title: Number of mapped keys for the maps in package GO.db
> ### Aliases: GOMAPCOUNTS
> ### Keywords: datasets
> 
> ### ** Examples
> 
> ## select() interface:
> ## Objects in this package can be accessed using the select() interface
> ## from the AnnotationDbi package. See ?select for details.
> 
> ## Bimap interface:
> GOMAPCOUNTS
 GOBPANCESTOR  GOBPCHILDREN GOBPOFFSPRING   GOBPPARENTS  GOCCANCESTOR 
        28477         16829         16829         28477          3897 
 GOCCCHILDREN GOCCOFFSPRING   GOCCPARENTS  GOMFANCESTOR  GOMFCHILDREN 
         1317          1317          3897         10021          2046 
GOMFOFFSPRING   GOMFPARENTS    GOOBSOLETE        GOTERM 
         2046         10021          2012         42396 
> mapnames <- names(GOMAPCOUNTS)
> GOMAPCOUNTS[mapnames[1]]
GOBPANCESTOR 
       28477 
> x <- get(mapnames[1])
> sum(!is.na(as.list(x)))
[1] 28477
> count.mappedkeys(x)   # much faster!
[1] 28477
> 
> ## Check the "map count" of all the maps in package GO.db
> checkMAPCOUNTS("GO.db")
Counting mapped keys for map GOBPANCESTOR:
  - length(map) = 28477
  - MAPCOUNTS["GOBPANCESTOR"] = 28477
  - count1 = 28477 (0.681 s)
  - count2 = 28477 (0.472 s)
  - count3 = 28477 (0.989 s)
Counting mapped keys for map GOBPCHILDREN:
  - length(map) = 28477
  - MAPCOUNTS["GOBPCHILDREN"] = 16829
  - count1 = 16829 (0.099 s)
  - count2 = 16829 (0.072 s)
  - count3 = 16829 (0.256 s)
Counting mapped keys for map GOBPOFFSPRING:
  - length(map) = 28477
  - MAPCOUNTS["GOBPOFFSPRING"] = 16829
  - count1 = 16829 (0.674 s)
  - count2 = 16829 (0.416 s)
  - count3 = 16829 (1.037 s)
Counting mapped keys for map GOBPPARENTS:
  - length(map) = 28477
  - MAPCOUNTS["GOBPPARENTS"] = 28477
  - count1 = 28477 (0.109 s)
  - count2 = 28477 (0.07 s)
  - count3 = 28477 (0.246 s)
Counting mapped keys for map GOCCANCESTOR:
  - length(map) = 3897
  - MAPCOUNTS["GOCCANCESTOR"] = 3897
  - count1 = 3897 (0.064 s)
  - count2 = 3897 (0.065 s)
  - count3 = 3897 (0.078 s)
Counting mapped keys for map GOCCCHILDREN:
  - length(map) = 3897
  - MAPCOUNTS["GOCCCHILDREN"] = 1317
  - count1 = 1317 (0.011 s)
  - count2 = 1317 (0.01 s)
  - count3 = 1317 (0.026 s)
Counting mapped keys for map GOCCOFFSPRING:
  - length(map) = 3897
  - MAPCOUNTS["GOCCOFFSPRING"] = 1317
  - count1 = 1317 (0.047 s)
  - count2 = 1317 (0.049 s)
  - count3 = 1317 (0.068 s)
Counting mapped keys for map GOCCPARENTS:
  - length(map) = 3897
  - MAPCOUNTS["GOCCPARENTS"] = 3897
  - count1 = 3897 (0.013 s)
  - count2 = 3897 (0.014 s)
  - count3 = 3897 (0.027 s)
Counting mapped keys for map GOMFANCESTOR:
  - length(map) = 10021
  - MAPCOUNTS["GOMFANCESTOR"] = 10021
  - count1 = 10021 (0.078 s)
  - count2 = 10021 (0.06 s)
  - count3 = 10021 (0.113 s)
Counting mapped keys for map GOMFCHILDREN:
  - length(map) = 10021
  - MAPCOUNTS["GOMFCHILDREN"] = 2046
  - count1 = 2046 (0.016 s)
  - count2 = 2046 (0.016 s)
  - count3 = 2046 (0.058 s)
Counting mapped keys for map GOMFOFFSPRING:
  - length(map) = 10021
  - MAPCOUNTS["GOMFOFFSPRING"] = 2046
  - count1 = 2046 (0.067 s)
  - count2 = 2046 (0.067 s)
  - count3 = 2046 (0.109 s)
Counting mapped keys for map GOMFPARENTS:
  - length(map) = 10021
  - MAPCOUNTS["GOMFPARENTS"] = 10021
  - count1 = 10021 (0.027 s)
  - count2 = 10021 (0.027 s)
  - count3 = 10021 (0.061 s)
Counting mapped keys for map GOOBSOLETE:
  - length(map) = 2012
  - MAPCOUNTS["GOOBSOLETE"] = 2012
  - count1 = 2012 (0.004 s)
  - count2 = 2012 (0.003 s)
Counting mapped keys for map GOTERM:
  - length(map) = 42396
  - MAPCOUNTS["GOTERM"] = 42396
  - count1 = 42396 (0.113 s)
  - count2 = 42396 (0.013 s)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>