View source: R/returnSamples.R
returnSamples | R Documentation |
To return samples across studies, users will use returnSamples()
along with
the sampleMetadata data.frame
subset to include only desired samples and
metadata. The subset sampleMetadata data.frame
will be used to get the
desired resources, mergeData will be used to merge them, and the subset
sampleMetadata data.frame
will be used again to subset the
SummarizedExperiment or
TreeSummarizedExperiment
object to include only desired samples and metadata.
returnSamples(sampleMetadata, dataType, counts = FALSE, rownames = "long")
sampleMetadata |
the sampleMetadata |
dataType |
the data type to be returned; one of the following:
|
counts |
if |
rownames |
the type of |
At present, curatedMetagenomicData resources exists only as entire studies which requires potentially getting many resources for a limited number of samples. Furthermore, because it is necessary to use mergeData internally, the same caveats detailed under Details in mergeData apply here.
when dataType = "relative_abundance"
, a
TreeSummarizedExperiment
object is returned; otherwise, a
SummarizedExperiment
object is returned
sampleMetadata |>
dplyr::filter(age >= 18) |>
dplyr::filter(!base::is.na(alcohol)) |>
dplyr::filter(body_site == "stool") |>
dplyr::select(where(~ !base::all(base::is.na(.x)))) |>
returnSamples("relative_abundance")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.