Description Usage Arguments Functions Examples
The xbioc package contains a few utility functions to facilitate working with Bioconductor annotations, which extends or enhance functions available in packages such as annotate.
1 2 3 4 5 6 7 8 9 10 11 | is.annpkg(x)
is.orgpkg(x)
is.anndb(x)
biocann_mapname(annotation, map, all = FALSE)
biocann_pkgname(x, noext = FALSE)
biocann_pkgobject(x)
|
x |
an R object, either a character string or an annotation object. |
annotation |
names of an annotation package, with “.db” suffix or not. |
map |
name of a map, e.g., “ENTREZID”. |
all |
logical that indicates if all possible names should be returned, and only the simple concatenation of the annotation package's name without “.db” and the map name. |
noext |
logical that indicates if returned package names should contain the extension '.db'. |
is.annpkg
: is.annpkg
tells if an object is the name of an annotation package.
is.orgpkg
: tells if an object is an organism annotation package.
is.anndb
: tells if an object is an annotation db object such as
hgu133a.db
.
biocann_mapname
: returns the name of a map in an annotation package.
biocann_pkgname
: returns the name of an annotation package, formated from character strings
or extracted from annotation objects.
biocann_pkgobject
: retrieve the AnnotationDb
object for an annotation
package given as a string.
The package does not need to be already loaded but needs to be installed in a library that
is in the search path.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | # check annotation pkg name
is.annpkg('aaa.db')
is.annpkg(c('bbb.db', 'ccc.db'))
is.annpkg(c('ddd', 'eee.db'))
# check AnnotationDb object
library(hgu133plus2.db)
is.anndb(hgu133plus2.db)
# build annotation bimap object names
biocann_mapname('hgu133plus2.db', 'ENTREZID')
# '.db' extension is skipped
biocann_mapname('hgu133plus2', 'ENTREZID')
# get all possible map names
biocann_mapname('hgu133plus2.db', 'ENTREZID', all=TRUE)
# annotation package name
biocann_pkgname('aa')
# extract the package name from annotation objects
biocann_pkgname(hgu133plus2.db)
biocann_pkgname(hgu133plus2ENTREZID)
# get AnnotationDb object
biocann_pkgobject('hgu133plus2') # extension can be skipped
# the package needs to be installed
try( biocann_pkgobject('aaa') )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.