Last data update: 2014.03.03

R: Number of mapped keys for the maps in package reactome.db
reactomeMAPCOUNTSR Documentation

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

Description

reactomeMAPCOUNTS provides the "map count" (i.e. the count of mapped keys) for each map in package reactome.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

Examples

  reactomeMAPCOUNTS
  mapnames <- names(reactomeMAPCOUNTS)
  reactomeMAPCOUNTS[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 reactome.db
  checkMAPCOUNTS("reactome.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(reactome.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/reactome.db/reactomeMAPCOUNTS.Rd_%03d_medium.png", width=480, height=480)
> ### Name: reactomeMAPCOUNTS
> ### Title: Number of mapped keys for the maps in package reactome.db
> ### Aliases: reactomeMAPCOUNTS
> ### Keywords: datasets
> 
> ### ** Examples
> 
>   reactomeMAPCOUNTS
 reactomeEXTID2PATHID reactomeGO2REACTOMEID  reactomePATHID2EXTID 
                65445                  1796                 17151 
  reactomePATHID2NAME   reactomePATHNAME2ID reactomeREACTOMEID2GO 
                20800                 20767                 51734 
>   mapnames <- names(reactomeMAPCOUNTS)
>   reactomeMAPCOUNTS[mapnames[1]]
reactomeEXTID2PATHID 
               65445 
>   x <- get(mapnames[1])
>   sum(!is.na(as.list(x)))
[1] 65445
>   count.mappedkeys(x)   # much faster!
[1] 65445
> 
>   ## Check the "map count" of all the maps in package reactome.db
>   checkMAPCOUNTS("reactome.db")
Counting mapped keys for map reactomeEXTID2PATHID:
  - length(map) = 65445
  - MAPCOUNTS["reactomeEXTID2PATHID"] = 65445
  - count1 = 65445 (0.934 s)
  - count2 = 65445 (0.92 s)
  - count3 = 65445 (1.51 s)
Counting mapped keys for map reactomeGO2REACTOMEID:
  - length(map) = 1796
  - MAPCOUNTS["reactomeGO2REACTOMEID"] = 1796
  - count1 = 1796 (0.042 s)
  - count2 = 1796 (0.043 s)
  - count3 = 1796 (0.103 s)
Counting mapped keys for map reactomePATHID2EXTID:
  - length(map) = 17151
  - MAPCOUNTS["reactomePATHID2EXTID"] = 17151
  - count1 = 17151 (0.672 s)
  - count2 = 17151 (0.586 s)
  - count3 = 17151 (1.788 s)
Counting mapped keys for map reactomePATHID2NAME:
  - length(map) = 20800
  - MAPCOUNTS["reactomePATHID2NAME"] = 20800
  - count1 = 20800 (0.047 s)
  - count2 = 20800 (0.053 s)
  - count3 = 20800 (0.179 s)
Counting mapped keys for map reactomePATHNAME2ID:
  - length(map) = 20767
  - MAPCOUNTS["reactomePATHNAME2ID"] = 20767
  - count1 = 20767 (0.068 s)
  - count2 = 20767 (0.083 s)
  - count3 = 20767 (0.273 s)
Counting mapped keys for map reactomeREACTOMEID2GO:
  - length(map) = 51734
  - MAPCOUNTS["reactomeREACTOMEID2GO"] = 51734
  - count1 = 51734 (0.121 s)
  - count2 = 51734 (0.139 s)
  - count3 = 51734 (0.671 s)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>