Learn R Programming

MeSHDbi (version 1.8.0)

makeGeneMeSHPackage: Making MeSHDb packages from corresponding table as single data frame.

Description

makeGeneMeSHPackage is a method that generates a package that will load an appropriate MeSHDb object that will in turn point to existing annotation packages.

Usage

makeGeneMeSHPackage(pkgname, data, metadata, organism, version, maintainer, author, destDir, license="Artistic-2.0")

Arguments

pkgname
What is the desired package name.
data
Data frame contains GENEID (e.g., 100036770), MESHID (e.g.D000465), CATEGORY (e.g., G), SOURCEID (pubmed id), and SOURCEDB (e.g., gendoo)
metadata
Data frame contains metadata of the package
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)

Value

MeSHDb object.

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 MeSHDb 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 MeSHDb 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.

See Also

MeSHDb

Examples

Run this code
## makeGeneMeSHPackage enable users to construct
## user's own custom MeSH package

## this is test data which means the relationship between
## Entrez gene IDs of Pseudomonas aeruginosa PAO1
## and its MeSH IDs.
data(PAO1)
head(PAO1)

# We are also needed to prepare meta data as follows.
data(metaPAO1)
metaPAO1

## 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
makeGeneMeSHPackage(pkgname = "MeSH.Pae.eg.db",
					data = PAO1,
          metadata = metaPAO1,
					organism = "Pseudomonas aeruginosa PAO1",
					version = "1.0.0",
					maintainer = "Koki Tsuyuzaki <k.t.the-answer@hotmail.co.jp>",
					author = "Koki Tsuyuzaki",
					destDir = destination,
					license="Artistic-2.0")

Run the code above in your browser using DataLab