bioentity_id_type | R Documentation |
WARNING: will return a result even if that result doesn't seem to match the type.
bioentity_id_type(id, type, rows = 100)
id |
A valid monarch initiative id. |
type |
A category to try for the id. |
rows |
Number of rows of results to fetch. |
This is a general method for when other appropriate API calls may not be available. Or you don't want to bother discovering the appropriate function name.
As a side effect of our Warning, in the event of an unsuccessful mapping, the info returned might still be useful for discovery of what categories your id maps to.
mimics https://api.monarchinitiative.org/api/bioentity/disease/MONDO
Types seem to map to Monarch Initiative 'categories' and are limited(?) to:
- gene - variant - disease - genotype - phenotype - goterm - pathway - anatomy - substance - individual
A list of (list of info for the id, monarch_api S3 class).
disease <-"MONDO:0006486"
bioentity_id_type(disease, 'disease')
#' # Note in this example, the info returned includes 'categories': 'disease' and 'quality'
# This is a hint of which valid 'types' will be 'successful' for a particular 'id'.
# Warning: Trying other types returns same info, because the other categories
# were irrelevant for this id.
# bioentity_id_type(disease, 'gene') # Not run. Does not get 'gene'!
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.