WARNING: will return a result even if that result doesn't seem to match the type.
A valid monarch initiative id.
A category to try for the id.
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.
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).
1 2 3 4 5 6 7
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.