Learn R Programming

MGRASTer (version 0.9)

MGRASTAPI: Local Representation of MG-RAST API

Description

The session copy of the documentation tree of the MG-RAST API, and tools for dynamic update.

Usage

.MGRAST load.MGRAST(ff=API.file()) build.MGRAST(ff=API.filename)

Arguments

ff
a file name (string or NULL)

Value

For build.MGRAST(), the file name ff, or the new documentation tree itself when ff=NULL. For load.MGRAST(), the copy of the API documentation tree stored in ff (by default the prepackaged copy), but the copy active in the current session when ff=NULL.

Details

This documentation assumes familiarity with the MG-RAST API, which is described elsewhere.

The environment .MGRAST contains a nested list structure API built from the documentation-qua-specification of the MG-RAST API published at http://api.metagenomics.anl.gov. A prebuilt version of this tree is distributed with the MGRASTer package, which the routines call.MGRAST() and parse.MGRAST() consult.

build.MGRAST() builds a new, accurate-up-to-the-minute copy of the documentation tree, which may be desirable to do after a change or patch is implemented in the API. However, to take effect, a new copy must be assigned into .MGRAST (as in the examples).

load.MGRAST() returns the tree as saved in a specified file, or the version of the tree actually in use.

References

http://metagenomics.anl.gov http://api.metagenomics.anl.gov http://www.json.org

See Also

doc.MGRAST, call.MGRAST, parse.MGRAST

Examples

Run this code
## Not run: 
# ##  get API currently in use
# API <- get ("API", .MGRAST)
# 
# ##  compare to API distributed with the package
# identical (API, load.MGRAST())
# 
# ##  build and save a new (possibly updated) copy
# build.MGRAST ("my_copy.rda")
# 
# ##  load it
# API <- load.MGRAST ("my_copy.rda")
# 
# ##  put it into effect
# assign ("API", API, .MGRAST)			
# ## End(Not run)

Run the code above in your browser using DataLab