R: Number of mapped keys for the maps in package...
illuminaHumanv2MAPCOUNTS
R Documentation
Number of mapped keys for the maps in package illuminaHumanv2.db
Description
illuminaHumanv2MAPCOUNTS provides the "map count" (i.e. the
count of mapped keys) for each map in package illuminaHumanv2.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
illuminaHumanv2MAPCOUNTS
mapnames <- names(illuminaHumanv2MAPCOUNTS)
illuminaHumanv2MAPCOUNTS[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 illuminaHumanv2.db
checkMAPCOUNTS("illuminaHumanv2.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(illuminaHumanv2.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.Hs.eg.db
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/illuminaHumanv2.db/illuminaHumanv2MAPCOUNTS.Rd_%03d_medium.png", width=480, height=480)
> ### Name: illuminaHumanv2MAPCOUNTS
> ### Title: Number of mapped keys for the maps in package illuminaHumanv2.db
> ### Aliases: illuminaHumanv2MAPCOUNTS
> ### Keywords: datasets
>
> ### ** Examples
>
> illuminaHumanv2MAPCOUNTS
illuminaHumanv2ACCNUM illuminaHumanv2ALIAS2PROBE
26691 62445
illuminaHumanv2CHR illuminaHumanv2CHRLENGTHS
24555 93
illuminaHumanv2CHRLOC illuminaHumanv2CHRLOCEND
24366 24366
illuminaHumanv2ENSEMBL illuminaHumanv2ENSEMBL2PROBE
24198 20703
illuminaHumanv2ENTREZID illuminaHumanv2ENZYME
24555 2897
illuminaHumanv2ENZYME2PROBE illuminaHumanv2GENENAME
965 24555
illuminaHumanv2GO illuminaHumanv2GO2ALLPROBES
22263 19449
illuminaHumanv2GO2PROBE illuminaHumanv2MAP
15179 24388
illuminaHumanv2OMIM illuminaHumanv2PATH
18008 7561
illuminaHumanv2PATH2PROBE illuminaHumanv2PFAM
229 22888
illuminaHumanv2PMID illuminaHumanv2PMID2PROBE
24338 437568
illuminaHumanv2PROSITE illuminaHumanv2REFSEQ
22888 24555
illuminaHumanv2SYMBOL illuminaHumanv2UNIGENE
24555 24446
illuminaHumanv2UNIPROT
22878
> mapnames <- names(illuminaHumanv2MAPCOUNTS)
> illuminaHumanv2MAPCOUNTS[mapnames[1]]
illuminaHumanv2ACCNUM
26691
> x <- get(mapnames[1])
> sum(!is.na(as.list(x)))
[1] 26691
> count.mappedkeys(x) # much faster!
[1] 26691
>
> ## Check the "map count" of all the maps in package illuminaHumanv2.db
> checkMAPCOUNTS("illuminaHumanv2.db")
Counting mapped keys for map illuminaHumanv2ACCNUM:
- length(map) = 49481
- MAPCOUNTS["illuminaHumanv2ACCNUM"] = 26691
- count1 = 26691 (0.093 s)
- count2 = 26691 (0.064 s)
- count3 = 26691 (0.496 s)
Counting mapped keys for map illuminaHumanv2ALIAS2PROBE:
- length(map) = 119263
- MAPCOUNTS["illuminaHumanv2ALIAS2PROBE"] = 62445
- count1 = 63486 (0.382 s)
Error in checkMAPCOUNTS("illuminaHumanv2.db") : count1 and count0 differ
Execution halted