R: Number of mapped keys for the maps in package...
illuminaRatv1MAPCOUNTS
R Documentation
Number of mapped keys for the maps in package illuminaRatv1.db
Description
illuminaRatv1MAPCOUNTS provides the "map count" (i.e. the
count of mapped keys) for each map in package illuminaRatv1.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
illuminaRatv1MAPCOUNTS
mapnames <- names(illuminaRatv1MAPCOUNTS)
illuminaRatv1MAPCOUNTS[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 illuminaRatv1.db
checkMAPCOUNTS("illuminaRatv1.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(illuminaRatv1.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.Rn.eg.db
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/illuminaRatv1.db/illuminaRatv1MAPCOUNTS.Rd_%03d_medium.png", width=480, height=480)
> ### Name: illuminaRatv1MAPCOUNTS
> ### Title: Number of mapped keys for the maps in package illuminaRatv1.db
> ### Aliases: illuminaRatv1MAPCOUNTS
> ### Keywords: datasets
>
> ### ** Examples
>
> illuminaRatv1MAPCOUNTS
illuminaRatv1ACCNUM illuminaRatv1ALIAS2PROBE
18053 25674
illuminaRatv1CHR illuminaRatv1CHRLENGTHS
15551 953
illuminaRatv1CHRLOC illuminaRatv1CHRLOCEND
13997 13997
illuminaRatv1ENSEMBL illuminaRatv1ENSEMBL2PROBE
14512 14172
illuminaRatv1ENTREZID illuminaRatv1ENZYME
15659 1923
illuminaRatv1ENZYME2PROBE illuminaRatv1GENENAME
871 15659
illuminaRatv1GO illuminaRatv1GO2ALLPROBES
13858 18507
illuminaRatv1GO2PROBE illuminaRatv1PATH
14359 5474
illuminaRatv1PATH2PROBE illuminaRatv1PFAM
225 13593
illuminaRatv1PMID illuminaRatv1PMID2PROBE
12123 80463
illuminaRatv1PROSITE illuminaRatv1REFSEQ
13593 15659
illuminaRatv1SYMBOL illuminaRatv1UNIGENE
15659 14252
illuminaRatv1UNIPROT
13596
> mapnames <- names(illuminaRatv1MAPCOUNTS)
> illuminaRatv1MAPCOUNTS[mapnames[1]]
illuminaRatv1ACCNUM
18053
> x <- get(mapnames[1])
> sum(!is.na(as.list(x)))
[1] 18053
> count.mappedkeys(x) # much faster!
[1] 18053
>
> ## Check the "map count" of all the maps in package illuminaRatv1.db
> checkMAPCOUNTS("illuminaRatv1.db")
Counting mapped keys for map illuminaRatv1ACCNUM:
- length(map) = 23365
- MAPCOUNTS["illuminaRatv1ACCNUM"] = 18053
- count1 = 18053 (0.05 s)
- count2 = 18053 (0.031 s)
- count3 = 18053 (0.205 s)
Counting mapped keys for map illuminaRatv1ALIAS2PROBE:
- length(map) = 58346
- MAPCOUNTS["illuminaRatv1ALIAS2PROBE"] = 25674
- count1 = 25465 (0.145 s)
Error in checkMAPCOUNTS("illuminaRatv1.db") : count1 and count0 differ
Execution halted