MGRAST: Implementation Details of MG-RAST API

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Manage implementation of the MG-RAST API via its local representation.

Usage

1
2
3
load.MGRAST(filename=API.filepath())
build.MGRAST(filename=API.filename)
.MGRAST

Arguments

filename

a file name (string)

Details

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 https://api.mg-rast.org. 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.

Value

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.

Author(s)

Daniel T. Braithwaite

References

http://mg-rast.org
http://api.mg-rast.org
http://www.json.org

See Also

doc.MGRAST, call.MGRAST

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
##  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)			

MG-RAST/MGRASTer documentation built on May 17, 2019, 11:14 p.m.