R: Number of mapped keys for the maps in package m20kcod.db
m20kcodMAPCOUNTS
R Documentation
Number of mapped keys for the maps in package m20kcod.db
Description
m20kcodMAPCOUNTS provides the "map count" (i.e. the
count of mapped keys) for each map in package m20kcod.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
m20kcodMAPCOUNTS
mapnames <- names(m20kcodMAPCOUNTS)
m20kcodMAPCOUNTS[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 m20kcod.db
checkMAPCOUNTS("m20kcod.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(m20kcod.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/m20kcod.db/m20kcodMAPCOUNTS.Rd_%03d_medium.png", width=480, height=480)
> ### Name: m20kcodMAPCOUNTS
> ### Title: Number of mapped keys for the maps in package m20kcod.db
> ### Aliases: m20kcodMAPCOUNTS
> ### Keywords: datasets
>
> ### ** Examples
>
> m20kcodMAPCOUNTS
m20kcodACCNUM m20kcodALIAS2PROBE m20kcodCHR
19793 54145 16290
m20kcodCHRLENGTHS m20kcodCHRLOC m20kcodCHRLOCEND
66 15737 15737
m20kcodENSEMBL m20kcodENSEMBL2PROBE m20kcodENTREZID
15600 13458 16300
m20kcodENZYME m20kcodENZYME2PROBE m20kcodGENENAME
2042 848 16300
m20kcodGO m20kcodGO2ALLPROBES m20kcodGO2PROBE
15658 19734 15399
m20kcodMGI m20kcodMGI2PROBE m20kcodPATH
16276 14033 5350
m20kcodPATH2PROBE m20kcodPFAM m20kcodPMID
225 15387 16280
m20kcodPMID2PROBE m20kcodPROSITE m20kcodREFSEQ
217620 15387 16010
m20kcodSYMBOL m20kcodUNIGENE m20kcodUNIPROT
16300 16148 15387
> mapnames <- names(m20kcodMAPCOUNTS)
> m20kcodMAPCOUNTS[mapnames[1]]
m20kcodACCNUM
19793
> x <- get(mapnames[1])
> sum(!is.na(as.list(x)))
[1] 19793
> count.mappedkeys(x) # much faster!
[1] 19793
>
> ## Check the "map count" of all the maps in package m20kcod.db
> checkMAPCOUNTS("m20kcod.db")
Counting mapped keys for map m20kcodACCNUM:
- length(map) = 19874
- MAPCOUNTS["m20kcodACCNUM"] = 19793
- count1 = 19793 (0.052 s)
- count2 = 19793 (0.026 s)
- count3 = 19793 (0.131 s)
Counting mapped keys for map m20kcodALIAS2PROBE:
- length(map) = 143708
- MAPCOUNTS["m20kcodALIAS2PROBE"] = 54145
- count1 = 54291 (0.169 s)
Error in checkMAPCOUNTS("m20kcod.db") : count1 and count0 differ
Execution halted