Description Usage Arguments Details Value Author(s) References See Also Examples
Manage implementation of the MG-RAST API via its local representation.
1 2 3 | load.MGRAST(file=API.filepath())
build.MGRAST(file=API.filename)
.MGRAST
|
file |
a file name (string) |
The MG-RAST API is developed in a dynamic environment, so stability of interface with respect to the R platform is an important concern. Handling unanticipated API revisions and patches gracefully is desirable. Naturally a new package version will always be compatible with a current API version, so this consideration applies to intervals between API and package updates.
The environment .MGRAST
contains a nested list structure API
mirroring the API specification published at http://api.metagenomics.anl.gov.
This "tree", consulted by call.MGRAST()
and parse.MGRAST()
, is local and prebuilt.
However, build.MGRAST() and load.MGRAST() provide some degree of
adaptability to minor API changes by managing this local representation.
build.MGRAST()
retrieves, structures, and saves an updated API tree.
The examples demonstrate how to make it take effect.
load.MGRAST()
returns the tree saved in a file or the tree actually in use.
For build.MGRAST()
, the file name file
,
or the new tree itself when file=NULL
.
For load.MGRAST()
, the tree stored in file
(by default the prebuilt version),
or the session's active version when file=NULL
.
Daniel T. Braithwaite
http://metagenomics.anl.gov
http://api.metagenomics.anl.gov
http://www.json.org
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## 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_api_copy.rda")
## load it
API <- load.MGRAST ("my_api_copy.rda")
## put it into effect
assign ("API", API, .MGRAST)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.