Description Usage Arguments Details Value Author(s) Examples
View source: R/makeMSEAPackage.R
makeMSEAPackage
is a method that generates a package that will
load an appropriate MSEADb
object that will in turn point to existing
annotation packages.
1 2 3 4 5 6 7 8 9 10 11 | makeMSEAPackage(
pkgname,
data,
metadata,
organism,
version,
maintainer,
author,
destDir,
license = "Artistic-2.0"
)
|
pkgname |
What is the desired package name. |
data |
Data frame contains PathBankID, PathwayName, PathwaySubject, MetaboliteID, MetaboliteName, HMDBID, KEGGID, ChEBIID, DrugBankID, CAS, Formula, IUPAC, SMILES, InChI, and InChIKey |
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) |
The purpose of this method is to create a special package that will depend
on existing annotation packages and which will load a special MSEADb
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 MSEADb
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.
A special package to load an MSEADb object.
Kozo Nishida
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ## makeMSEAPackage enable users to construct
## user's own custom MSEA annotation package
## this is test data which means the relationship between
## PathBank pathway IDs of Arabidopsis thaliana
## and its compound DB IDs (e.g., HMDB, CAS, etc...).
tmp <- tempdir()
ath <- system.file("extdata","MSEA.Ath.pb.db_DATA.csv",package="MSEADbi")
meta <- system.file("extdata","MSEA.Ath.pb.db_METADATA.csv",
package="MSEADbi")
athDf <- read.csv(ath, fileEncoding="utf8")
metaDf <- read.csv(meta)
# We need to avoid DOT from the column names (to query with the names)
names(athDf) <- gsub("\\.", "", names(athDf))
names(metaDf) <- gsub("\\.", "", names(metaDf))
makeMSEAPackage(pkgname = "MSEA.Ath.pb.db", data=athDf, metadata=metaDf,
organism = "Arabidopsis thaliana", version = "0.99.0",
maintainer = "Kozo Nishida <kozo.nishida@gmail.com>",
author = "Kozo Nishida",
destDir = tmp, license = "Artistic-2.0")
mseaPackageDir = paste(tmp, "MSEA.Ath.pb.db", sep="/")
install.packages(mseaPackageDir, repos=NULL, type="source")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.