Last data update: 2014.03.03

R: Number of mapped keys for the maps in package m10kcod.db
m10kcodMAPCOUNTSR Documentation

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

Description

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

  m10kcodMAPCOUNTS
  mapnames <- names(m10kcodMAPCOUNTS)
  m10kcodMAPCOUNTS[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 m10kcod.db
  checkMAPCOUNTS("m10kcod.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(m10kcod.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

Loading required package: org.Mm.eg.db


> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/m10kcod.db/m10kcodMAPCOUNTS.Rd_%03d_medium.png", width=480, height=480)
> ### Name: m10kcodMAPCOUNTS
> ### Title: Number of mapped keys for the maps in package m10kcod.db
> ### Aliases: m10kcodMAPCOUNTS
> ### Keywords: datasets
> 
> ### ** Examples
> 
>   m10kcodMAPCOUNTS
       m10kcodACCNUM   m10kcodALIAS2PROBE           m10kcodCHR 
                9718                36481                 8887 
   m10kcodCHRLENGTHS        m10kcodCHRLOC     m10kcodCHRLOCEND 
                  66                 8821                 8821 
      m10kcodENSEMBL m10kcodENSEMBL2PROBE      m10kcodENTREZID 
                8782                 8694                 8888 
       m10kcodENZYME  m10kcodENZYME2PROBE      m10kcodGENENAME 
                1404                  722                 8888 
           m10kcodGO  m10kcodGO2ALLPROBES      m10kcodGO2PROBE 
                8785                18664                14213 
          m10kcodMGI     m10kcodMGI2PROBE          m10kcodPATH 
                8884                 8735                 3438 
   m10kcodPATH2PROBE          m10kcodPFAM          m10kcodPMID 
                 225                 8742                 8887 
   m10kcodPMID2PROBE       m10kcodPROSITE        m10kcodREFSEQ 
              199884                 8742                 8856 
       m10kcodSYMBOL       m10kcodUNIGENE       m10kcodUNIPROT 
                8888                 8870                 8742 
>   mapnames <- names(m10kcodMAPCOUNTS)
>   m10kcodMAPCOUNTS[mapnames[1]]
m10kcodACCNUM 
         9718 
>   x <- get(mapnames[1])
>   sum(!is.na(as.list(x)))
[1] 9718
>   count.mappedkeys(x)   # much faster!
[1] 9718
> 
>   ## Check the "map count" of all the maps in package m10kcod.db
>   checkMAPCOUNTS("m10kcod.db")
Counting mapped keys for map m10kcodACCNUM:
  - length(map) = 9799
  - MAPCOUNTS["m10kcodACCNUM"] = 9718
  - count1 = 9718 (0.025 s)
  - count2 = 9718 (0.014 s)
  - count3 = 9718 (0.079 s)
Counting mapped keys for map m10kcodALIAS2PROBE:
  - length(map) = 143708
  - MAPCOUNTS["m10kcodALIAS2PROBE"] = 36481
  - count1 = 36584 (0.174 s)
Error in checkMAPCOUNTS("m10kcod.db") : count1 and count0 differ
Execution halted