Learn R Programming

matR (version 0.9.1)

BIOMretrieval: Get annotation information of samples as BIOM data

Description

Retrieve annotation pipeline information (such as abundance profiles) for specified metagenomes and projects into an object of class biom.

Usage

biomRequest(x, request=c("function", "organism"), ...,
  block, wait=TRUE, quiet=FALSE, file, outfile)

# S3 method for environment biom(x, wait=TRUE, ..., quiet=FALSE)

Arguments

x

a set of metagenomes and/or projects (character) or a request ticket (environment)

request

choice of annotation type (string)

arguments specifying or qualifying the data desired (biomRequest() only)

block

number of metagenomes per API call (integer)

wait

return only when data is complete? (logical)

quiet

suppress messages and warnings? (logical)

file

file containing a set of metagenomes or projects (string)

outfile

file to save the retrieved data (string)

Value

For biomRequest(), an environment if wait=FALSE. Otherwise and for biom.environment(), a biom object.

Details

Complete technical documentation is forthcoming. For the current preliminary release, please refer to the examples provided.

See Also

BIOM.utils::biom, MGRASTer::call.MGRAST

Examples

Run this code
# NOT RUN {
####  several files demonstrate valid formats for ID input
demoSets()

# }
# NOT RUN {
ff <- demoSets()

####  simple retrieval of annotation data
yy <- biomRequest (file=ff[1])
head (rows (yy))

####  many arguments can modify what is retrieved
yy <- biomRequest (file=ff[1], group_level="level1")
rownames (yy)

####  taxonomic annotations
yy <- biomRequest (file=ff[4], request="organism", group_level="phylum", source="Greengenes")

####  IDs can be given directly, while output can be to a file
biomRequest ("mgp9", request="function", outfile=file.path(tempdir("mgp9.biom")))
biomRequest ("mgm4441619.3 mgm4441620.3 mgm4441656.4", 
  request="function", outfile=file.path(tempdir("mgp9.biom")))

####  place an asynchronous request...
yy <- biomRequest ("mgp9", wait=FALSE)
####  ...and receive the data when convenient
yy <- biom (yy)
# }
# NOT RUN {
####  full detail for available options
doc.MGRAST (3, head=c("matrix","function","parameters","options"))
doc.MGRAST (3, head=c("matrix","organism","parameters","options"))
# }

Run the code above in your browser using DataLab