getResult | R Documentation |
Get microbial and/or functional profiling data for a list of accessions
getResult(x, ...)
## S4 method for signature 'MgnifyClient'
getResult(
x,
accession,
get.taxa = TRUE,
get.func = TRUE,
output = "TreeSE",
...
)
x |
A |
... |
optional arguments:
|
accession |
A single character value or a vector of character values specifying accession IDs to return results for. |
get.taxa |
A boolean value specifying whether to retrieve taxonomy
data (OTU table). See |
get.func |
A boolean value or a single character value or a vector
character values specifying functional analysis types to retrieve. If
|
output |
A single character value specifying the format of an output.
Must be one of the following options: |
Given a set of analysis accessions and collection of annotation types,
the function queries the MGNify API and returns the results. This function
is convenient for retrieving highly structured (analysis vs counts) data on
certain instances. For example, BIOM files are downloaded automatically.
If you want just to retrieve raw data from the database, see getData
.
If only taxonomy data is retrieved, the result is returned in
TreeSummarizedExperiment
object by default. The result can also be
returned as a phyloseq
object or as a list of data.frames
.
Note that phyloseq
object can include only one phylogenetic tree
meaning that some taxa might be lost when data is subsetted based on tree.
When functional data is retrieved in addition to taxonomy data, the result
is returned as a MultiAssayExperiment
object. Other options are a list
containing phyloseq
object and data.frames
or just
data.frames
.
Functional data can be returned as a MultiAssayExperiment
object or
as a list of data.frames
.
getData
# Create a client object
mg <- MgnifyClient(useCache = FALSE)
# Get OTU tables as TreeSE
accession_list <- c("MGYA00377505")
tse <- getResult(mg, accession_list, get.func=FALSE, get.taxa=TRUE)
## Not run:
# Get functional data along with OTU tables as MAE
mae <- getResult(mg, accession_list, get.func=TRUE, get.taxa=TRUE)
# Get same data as list
list <- getResult(
mg, accession_list, get.func=TRUE, get.taxa=TRUE, output = "list",
as.df = TRUE, use.cache = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.