R: Making OrganismDb packages from annotation packages.
makeOrganismPackage
R Documentation
Making OrganismDb packages from annotation packages.
Description
makeOrganismPackage is a method that generates a package
that will load an appropriate annotationOrganismDb object that
will in turn point to existing annotation packages.
What is the desired package name. Traditionally, this
should be the genus and species separated by a ".". So as an example,
"Homo.sapiens" would be the package name for human
graphData
A list of short character vectors. Each character
vector in the list is exactly two elements long and represents a join
relationship between two packages. The names of these character
vectors are the package names and the values are the foreign keys that
should be used to connect each package. All foreign keys must be
values that can be returned by the columns method for each package in
question, and obviously they also must be the same kind of identifier
as well.
organism
The name of the organism this package represents
version
What is the version number for this package?
maintainer
Who is the package maintainer? (must include email to be
valid)
author
Who is the creator of this package?
destDir
A path where the package source should be assembled.
license
What is the license (and it's version)
Details
The purpose of this method is to create a special package that will
depend on existing annotation packages and which will load a special
annotationOrganismDb object that will allow proper dispatch of
special select methods. These methods will allow the user to easily
query across multiple annotation resources via information contained
by the annotationOrganismDb object. Because the end result will
be a package that treats all the data mapped together as a single
source, the user is encouraged to take extra care to ensure that the
different packages used are from the same build etc.
Value
A special package to load an OrganismDb object.
Author(s)
M. Carlson
See Also
OrganismDb
Examples
## set up the list with the relevant relationships:
gd <- list(join1 = c(GO.db="GOID", org.Hs.eg.db="GO"),
join2 = c(org.Hs.eg.db="ENTREZID",
TxDb.Hsapiens.UCSC.hg19.knownGene="GENEID"))
## sets up a temporary directory for this example
## (users won't need to do this step)
destination <- tempfile()
dir.create(destination)
## makes an Organism package for human called Homo.sapiens
if(interactive()){
makeOrganismPackage(pkgname = "Homo.sapiens",
graphData = gd,
organism = "Homo sapiens",
version = "1.0.0",
maintainer = "Bioconductor Package Maintainer <maintainer@bioconductor.org>",
author = "Bioconductor Core Team",
destDir = destination,
license = "Artistic-2.0")
}
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(OrganismDbi)
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: AnnotationDbi
Loading required package: stats4
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: GenomicFeatures
Loading required package: GenomeInfoDb
Loading required package: GenomicRanges
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/OrganismDbi/makeOrganismPackage.Rd_%03d_medium.png", width=480, height=480)
> ### Name: makeOrganismPackage
> ### Title: Making OrganismDb packages from annotation packages.
> ### Aliases: makeOrganismPackage
>
> ### ** Examples
>
> ## set up the list with the relevant relationships:
> gd <- list(join1 = c(GO.db="GOID", org.Hs.eg.db="GO"),
+ join2 = c(org.Hs.eg.db="ENTREZID",
+ TxDb.Hsapiens.UCSC.hg19.knownGene="GENEID"))
>
> ## sets up a temporary directory for this example
> ## (users won't need to do this step)
> destination <- tempfile()
> dir.create(destination)
>
> ## makes an Organism package for human called Homo.sapiens
> #if(interactive()){
> makeOrganismPackage(pkgname = "Homo.sapiens",
+ graphData = gd,
+ organism = "Homo sapiens",
+ version = "1.0.0",
+ maintainer = "Bioconductor Package Maintainer <maintainer@bioconductor.org>",
+ author = "Bioconductor Core Team",
+ destDir = destination,
+ license = "Artistic-2.0")
Creating package in /tmp/RtmpzHcHcd/file4589575f808d/Homo.sapiens
> #}
>
>
>
>
>
> dev.off()
null device
1
>