mgnify_get | R Documentation |
MGnify API: https://www.ebi.ac.uk/metagenomics/api/v1/
mgnify_get( accession = NULL, section = c("samples", "studies", "analyses", "biomes", "experiment-types"), search = NULL, lineage = NULL, instrument_platform = NULL, instrument_model = NULL, query = list(), max_pages = 1, base_url = "https://www.ebi.ac.uk/metagenomics/api/v1/", cache_file = "mgnify_request.RDS", cache_break = 10, use_cache = TRUE, ... )
accession |
Study accession (primary or secondary). If provided, just info returned for that study. |
section |
Section of the API to query. |
search |
General keyword search to filter records. |
lineage |
Filter by lineage (eg., "root:Host-associated:Human"). |
query |
List of additional queries provided to httr::GET. |
max_pages |
The maximum number of pages of records to return. |
base_url |
MGnify API base url |
cache_file |
File name to cache (checkpoint) the results. Useful for big queries in case the job is interuppted. |
cache_break |
Write cache file every N pages. |
use_cache |
Read the cache file, if it exists? |
... |
Parameters passed to httr::GET |
instrutment_platform |
Sequencing instrument platform (eg., "ILLUMINA"). |
instrutment_model |
Sequencing instrument model (eg., "HiSeq" or "MiSeq"). |
This function can query any "section" of the API (eg., "studies" or "samples").
Main filtering options are listed in the function (eg., lineage). More queries can be provides as a list via the query parameter. Note that not all filtering options for work each section. To see all filtering options for each section, click the "Filters" button at https://www.ebi.ac.uk/metagenomics/api/v1/samples
To prevent accidental big queries, only 1 page of results is returned by default (max_pages).
data.frame
mgnify_get() mgnify_get(search='soil') mgnify_get(section='biomes') mgnify_get(section='experiment-types') mgnify_get(accession = 'ERP009004', section='studies') mgnify_get(lineage='root:Host-associated', instrument_platform = 'ILLUMINA', instrument_model = 'HiSeq', max_pages=8) mgnify_get(accession = 'SRS2472313')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.