The OMA Brower now supports its own REST API, which serves as a window into its database. It enables the abstraction of OMA browser’s data which also allows it to be more accessible via other programming languages. Furthermore, due to its RESTful architecture, it allows the users to access the data they need easily through HTTP requests sent to the server which can be found at:
The OMA REST API supports many data formats and its predominant use of the JSON data format makes it very browser-compatible.To further facilitate the ease of access, we have also developed a Python library and R package to serve as user friendly wrappers around the API. The links to their documentation can be found below:
Note that some endpoints, such as the list of all Hierarchical Orthologous groups, return a very long list. In order to keep the response size and time manageable the API will take advantage of pagination, which is a mechanism for returning a subset of the results for a request (by default, we return the results in chunks of 100 objects) and allowing for subsequent requests to “page” through the rest of the results until the end is reached. This pagination is implemented with a "page" query parameter and a "per_page" parameter to specify the number of objects per page.
Information about pagination is provided in theLink header of an API call. This is a popular way how to implement pagination for APIs. In essence this strategy includes in the HTTP reply header a "Link" header with the urls to to next, previous, first and last page. Furthermore, we include in the "X-Total-Count" header the total number of objects that the request will return over all pages. Here is an example request:
curl -I "https://omabrowser.org/api/genome/?page=2"
HTTP 200 OKAllow: GET, HEAD, OPTIONSContent-Type: application/jsonLink: <https://omabrowser.org/api/genomes/>; rel="first", <https://omabrowser.org/api/genomes/>; rel="prev", <https://omabrowser.org/api/genomes/?page=3>; rel="next", <https://omabrowser.org/api/genomes/?page=22>; rel="last"Vary: AcceptX-Total-Count: 2198
| Status Code | Description |
|---|---|
| 200 | OK. All is well. |
| 400 | Malformed request. |
| 404 | Not found. |
| 500 | Internal Server Error. |
Below we list all the available endpoints together with a brief description of what they return and the parameters they take.
# Install the command line client$pipinstallcoreapi-cli<!-- Load the JavaScript client library --><scriptsrc="/static/rest_framework/js/coreapi-0.1.1.js"></script><scriptsrc="/api/docsschema.js"></script># Install the Python client library$pipinstallcoreapi/api/enrichment/The request body should be a"application/json" encoded object, containing the following items.
| Parameter | Description |
|---|---|
typerequired | |
foregroundrequired | |
taxlevel | |
name |
# Load the schema document$coreapigethttps://omabrowser.org/api/docs# Interact with the API endpoint$coreapiactionenrichmentcreate-ptype=...-pforeground=...-ptaxlevel=...-pname=...varcoreapi=window.coreapi// Loaded by `coreapi.js`varschema=window.schema// Loaded by `schema.js`// Initialize a clientvarclient=newcoreapi.Client()// Interact with the API endpointvaraction=["enrichment","create"]varparams={type:...,foreground:...,taxlevel:...,name:...,}client.action(schema,action,params).then(function(result){// Return value is in 'result'})importcoreapi# Initialize a client & load the schema documentclient=coreapi.Client()schema=client.get("https://omabrowser.org/api/docs")# Interact with the API endpointaction=["enrichment","create"]params={"type":...,"foreground":...,"taxlevel":...,"name":...,}result=client.action(schema,action,params=params)/api/enrichment/status/{id}/The following parameters should be included in the URL path.
| Parameter | Description |
|---|---|
idrequired | A UUID string identifying this enrichment analysis model. |
# Load the schema document$coreapigethttps://omabrowser.org/api/docs# Interact with the API endpoint$coreapiactionenrichmentstatusread-pid=...varcoreapi=window.coreapi// Loaded by `coreapi.js`varschema=window.schema// Loaded by `schema.js`// Initialize a clientvarclient=newcoreapi.Client()// Interact with the API endpointvaraction=["enrichment","status > read"]varparams={id:...,}client.action(schema,action,params).then(function(result){// Return value is in 'result'})importcoreapi# Initialize a client & load the schema documentclient=coreapi.Client()schema=client.get("https://omabrowser.org/api/docs")# Interact with the API endpointaction=["enrichment","status > read"]params={"id":...,}result=client.action(schema,action,params=params)/api/function/Annotate a sequence with GO functions based on allannotations in OMA. The sequence is expected to be asimple string of amino acids and can be passed as aquery parameter
The following parameters should be included as part of a URL query string.
| Parameter | Description |
|---|---|
queryrequired | the sequence to be annotated |
# Load the schema document$coreapigethttps://omabrowser.org/api/docs# Interact with the API endpoint$coreapiactionfunctionlist-pquery=...varcoreapi=window.coreapi// Loaded by `coreapi.js`varschema=window.schema// Loaded by `schema.js`// Initialize a clientvarclient=newcoreapi.Client()// Interact with the API endpointvaraction=["function","list"]varparams={query:...,}client.action(schema,action,params).then(function(result){// Return value is in 'result'})importcoreapi# Initialize a client & load the schema documentclient=coreapi.Client()schema=client.get("https://omabrowser.org/api/docs")# Interact with the API endpointaction=["function","list"]params={"query":...,}result=client.action(schema,action,params=params)/api/genome/List of all the genomes present in the current release.
The following parameters should be included as part of a URL query string.
| Parameter | Description |
|---|---|
page | A page number within the paginated result set. |
per_page | Number of results to return per page. |
# Load the schema document$coreapigethttps://omabrowser.org/api/docs# Interact with the API endpoint$coreapiactiongenomelist-ppage=...-pper_page=...varcoreapi=window.coreapi// Loaded by `coreapi.js`varschema=window.schema// Loaded by `schema.js`// Initialize a clientvarclient=newcoreapi.Client()// Interact with the API endpointvaraction=["genome","list"]varparams={page:...,per_page:...,}client.action(schema,action,params).then(function(result){// Return value is in 'result'})importcoreapi# Initialize a client & load the schema documentclient=coreapi.Client()schema=client.get("https://omabrowser.org/api/docs")# Interact with the API endpointaction=["genome","list"]params={"page":...,"per_page":...,}result=client.action(schema,action,params=params)/api/genome/{genome_id}/Retrieve the information available for a given genome.
The following parameters should be included in the URL path.
| Parameter | Description |
|---|---|
genome_idrequired | an unique identifier for a genome - either its ncbi taxon id or the UniProt species code |
# Load the schema document$coreapigethttps://omabrowser.org/api/docs# Interact with the API endpoint$coreapiactiongenomeread-pgenome_id=...varcoreapi=window.coreapi// Loaded by `coreapi.js`varschema=window.schema// Loaded by `schema.js`// Initialize a clientvarclient=newcoreapi.Client()// Interact with the API endpointvaraction=["genome","read"]varparams={genome_id:...,}client.action(schema,action,params).then(function(result){// Return value is in 'result'})importcoreapi# Initialize a client & load the schema documentclient=coreapi.Client()schema=client.get("https://omabrowser.org/api/docs")# Interact with the API endpointaction=["genome","read"]params={"genome_id":...,}result=client.action(schema,action,params=params)/api/genome/{genome_id}/genes/Retrieve the list of all the genes available for a genome.
This corresponds to the list of main isoform for genomes withmultiple isoforms, or to all the proteins for the others.
The following parameters should be included in the URL path.
| Parameter | Description |
|---|---|
genome_idrequired | an unique identifier for a genome - either its ncbi taxon id or the UniProt species code |
# Load the schema document$coreapigethttps://omabrowser.org/api/docs# Interact with the API endpoint$coreapiactiongenomegenes-pgenome_id=...varcoreapi=window.coreapi// Loaded by `coreapi.js`varschema=window.schema// Loaded by `schema.js`// Initialize a clientvarclient=newcoreapi.Client()// Interact with the API endpointvaraction=["genome","genes"]varparams={genome_id:...,}client.action(schema,action,params).then(function(result){// Return value is in 'result'})importcoreapi# Initialize a client & load the schema documentclient=coreapi.Client()schema=client.get("https://omabrowser.org/api/docs")# Interact with the API endpointaction=["genome","genes"]params={"genome_id":...,}result=client.action(schema,action,params=params)/api/genome/{genome_id}/proteins/Retrieve the list of all the protein entries available for a genome.
The following parameters should be included in the URL path.
| Parameter | Description |
|---|---|
genome_idrequired | an unique identifier for a genome - either its ncbi taxon id or the UniProt species code |
# Load the schema document$coreapigethttps://omabrowser.org/api/docs# Interact with the API endpoint$coreapiactiongenomeproteins-pgenome_id=...varcoreapi=window.coreapi// Loaded by `coreapi.js`varschema=window.schema// Loaded by `schema.js`// Initialize a clientvarclient=newcoreapi.Client()// Interact with the API endpointvaraction=["genome","proteins"]varparams={genome_id:...,}client.action(schema,action,params).then(function(result){// Return value is in 'result'})importcoreapi# Initialize a client & load the schema documentclient=coreapi.Client()schema=client.get("https://omabrowser.org/api/docs")# Interact with the API endpointaction=["genome","proteins"]params={"genome_id":...,}result=client.action(schema,action,params=params)/api/group/List of all the OMA Groups in the current release.
The following parameters should be included as part of a URL query string.
| Parameter | Description |
|---|---|
page | A page number within the paginated result set. |
per_page | Number of results to return per page. |
# Load the schema document$coreapigethttps://omabrowser.org/api/docs# Interact with the API endpoint$coreapiactiongrouplist-ppage=...-pper_page=...varcoreapi=window.coreapi// Loaded by `coreapi.js`varschema=window.schema// Loaded by `schema.js`// Initialize a clientvarclient=newcoreapi.Client()// Interact with the API endpointvaraction=["group","list"]varparams={page:...,per_page:...,}client.action(schema,action,params).then(function(result){// Return value is in 'result'})importcoreapi# Initialize a client & load the schema documentclient=coreapi.Client()schema=client.get("https://omabrowser.org/api/docs")# Interact with the API endpointaction=["group","list"]params={"page":...,"per_page":...,}result=client.action(schema,action,params=params)/api/group/{group_id}/Retrieve the information available for a given OMA group.
The following parameters should be included in the URL path.
| Parameter | Description |
|---|---|
group_idrequired | an unique identifier for an OMA group - either its group number, its fingerprint or an entry id of one of its members |
# Load the schema document$coreapigethttps://omabrowser.org/api/docs# Interact with the API endpoint$coreapiactiongroupread-pgroup_id=...varcoreapi=window.coreapi// Loaded by `coreapi.js`varschema=window.schema// Loaded by `schema.js`// Initialize a clientvarclient=newcoreapi.Client()// Interact with the API endpointvaraction=["group","read"]varparams={group_id:...,}client.action(schema,action,params).then(function(result){// Return value is in 'result'})importcoreapi# Initialize a client & load the schema documentclient=coreapi.Client()schema=client.get("https://omabrowser.org/api/docs")# Interact with the API endpointaction=["group","read"]params={"group_id":...,}result=client.action(schema,action,params=params)/api/group/{group_id}/close_groups/Retrieve the sorted list of closely related groups for a given OMA group.
The following parameters should be included in the URL path.
| Parameter | Description |
|---|---|
group_idrequired | an unique identifier for an OMA group - either its group number, its fingerprint or an entry id of one of its members |
# Load the schema document$coreapigethttps://omabrowser.org/api/docs# Interact with the API endpoint$coreapiactiongroupclose_groups-pgroup_id=...varcoreapi=window.coreapi// Loaded by `coreapi.js`varschema=window.schema// Loaded by `schema.js`// Initialize a clientvarclient=newcoreapi.Client()// Interact with the API endpointvaraction=["group","close_groups"]varparams={group_id:...,}client.action(schema,action,params).then(function(result){// Return value is in 'result'})importcoreapi# Initialize a client & load the schema documentclient=coreapi.Client()schema=client.get("https://omabrowser.org/api/docs")# Interact with the API endpointaction=["group","close_groups"]params={"group_id":...,}result=client.action(schema,action,params=params)/api/hog/List of all the HOGs identified by OMA.
The following parameters should be included as part of a URL query string.
| Parameter | Description |
|---|---|
level | filter the list of HOGs by a specific taxonomic level. |
compare_with | compares the hog at `level` with those passed with this argument (must be a parent level) and annotates all hogs with the evolutionary events that occured between the two points in time. |
page | A page number within the paginated result set. |
per_page | Number of results to return per page. |
# Load the schema document$coreapigethttps://omabrowser.org/api/docs# Interact with the API endpoint$coreapiactionhoglist-plevel=...-pcompare_with=...-ppage=...-pper_page=...varcoreapi=window.coreapi// Loaded by `coreapi.js`varschema=window.schema// Loaded by `schema.js`// Initialize a clientvarclient=newcoreapi.Client()// Interact with the API endpointvaraction=["hog","list"]varparams={level:...,compare_with:...,page:...,per_page:...,}client.action(schema,action,params).then(function(result){// Return value is in 'result'})importcoreapi# Initialize a client & load the schema documentclient=coreapi.Client()schema=client.get("https://omabrowser.org/api/docs")# Interact with the API endpointaction=["hog","list"]params={"level":...,"compare_with":...,"page":...,"per_page":...,}result=client.action(schema,action,params=params)/api/hog/{hog_id}/Retrieve the detail available for a given HOG, along with its deepest level(i.e. root level) as well as the list of all the taxonomic levels that the HOGspans through.
For a given hog_id, the endpoint searches the deepest taxonomic level thathas this ID, unless a more recent level has been chosen with thelevel queryparameter in which case the following information is returned for all inducedhogs.
The endpoint returns an object per hog with the level, urls to the members anda list of parent and children hogs. The parent and children hogs are moreancient resp. more recent levels that involve at least one duplication eventon the lineage from the query hog. So, in the parent_hogs, one can find hogsfor which we infer a duplication eventto the query hog level, where asfor the children_hogs there happened at least one duplication eventafterthe query hog level. In addition, we indicate alternative levels for whichwe infer that no event happened between those levels for this specific hog.
The following parameters should be included in the URL path.
| Parameter | Description |
|---|---|
hog_idrequired | an unique identifier for a hog_group - either its hog id or one of its member proteins |
The following parameters should be included as part of a URL query string.
| Parameter | Description |
|---|---|
level | taxonomic level of restriction for a HOG. The special level 'root' can be used to identify the level at the roothog, i.e. the deepest level of that HOG. |
# Load the schema document$coreapigethttps://omabrowser.org/api/docs# Interact with the API endpoint$coreapiactionhogread-phog_id=...-plevel=...varcoreapi=window.coreapi// Loaded by `coreapi.js`varschema=window.schema// Loaded by `schema.js`// Initialize a clientvarclient=newcoreapi.Client()// Interact with the API endpointvaraction=["hog","read"]varparams={hog_id:...,level:...,}client.action(schema,action,params).then(function(result){// Return value is in 'result'})importcoreapi# Initialize a client & load the schema documentclient=coreapi.Client()schema=client.get("https://omabrowser.org/api/docs")# Interact with the API endpointaction=["hog","read"]params={"hog_id":...,"level":...,}result=client.action(schema,action,params=params)/api/hog/{hog_id}/gene_ontology/Gene ontology annotations for an ancestral gene (i.e. HOG).
If a level is provided, the endpoint returns annotations with respectto this level. Note that if the level is a more ancient taxonomiclevel than the deepest level for the specified hog_id, the endpointreturns the annotations of that more ancient level (but adjusting thehog_id in the result object).The special level "root" will always return the members of the rootHOG together with its deepest level.
The following parameters should be included in the URL path.
| Parameter | Description |
|---|---|
hog_idrequired | a unique identifier for a hog_group - either its hog id starting with "HOG:" or one of its member proteins in which case the specific HOG ID of that protein is used. (Example: HOG:0001221.1a, P12345) |
The following parameters should be included as part of a URL query string.
| Parameter | Description |
|---|---|
level | taxonomic level of reference for a HOG - default is its deepest level for a given HOG ID. (Example: Mammalia) |
# Load the schema document$coreapigethttps://omabrowser.org/api/docs# Interact with the API endpoint$coreapiactionhoggene_ontology-phog_id=...-plevel=...varcoreapi=window.coreapi// Loaded by `coreapi.js`varschema=window.schema// Loaded by `schema.js`// Initialize a clientvarclient=newcoreapi.Client()// Interact with the API endpointvaraction=["hog","gene_ontology"]varparams={hog_id:...,level:...,}client.action(schema,action,params).then(function(result){// Return value is in 'result'})importcoreapi# Initialize a client & load the schema documentclient=coreapi.Client()schema=client.get("https://omabrowser.org/api/docs")# Interact with the API endpointaction=["hog","gene_ontology"]params={"hog_id":...,"level":...,}result=client.action(schema,action,params=params)/api/hog/{hog_id}/members/Retrieve a list of all the protein members for a given hog_id.
The hog_id parameter uses an encoding of the inferred duplicationevents along the evolution of the family using the LOFT schema(see https://doi.org/10.1186/1471-2105-8-83).
The hog_id changes only after duplication events and hence, theID remains the same for potentially many taxonomic levels. Ifno level parameter is provided, this endpoint returns the deepestlevel that contains this specific ID.
If a level is provided, the endpoint returns the members with respectto this level. Note that if the level is a more ancient taxonomiclevel than the deepest level for the specified hog_id, the endpointretuns the members of for that more ancient level (but adjusting thehog_id in the result object).The special level "root" will always return the members of the rootHOG together with its deepest level.
The following parameters should be included in the URL path.
| Parameter | Description |
|---|---|
hog_idrequired | a unique identifier for a hog_group - either its hog id starting with "HOG:" or one of its member proteins in which case the specific HOG ID of that protein is used. (Example: HOG:0001221.1a, P12345) |
The following parameters should be included as part of a URL query string.
| Parameter | Description |
|---|---|
level | taxonomic level of restriction for a HOG - default is its deepest level for a given HOG ID. (Example: Mammalia) |
# Load the schema document$coreapigethttps://omabrowser.org/api/docs# Interact with the API endpoint$coreapiactionhogmembers-phog_id=...-plevel=...varcoreapi=window.coreapi// Loaded by `coreapi.js`varschema=window.schema// Loaded by `schema.js`// Initialize a clientvarclient=newcoreapi.Client()// Interact with the API endpointvaraction=["hog","members"]varparams={hog_id:...,level:...,}client.action(schema,action,params).then(function(result){// Return value is in 'result'})importcoreapi# Initialize a client & load the schema documentclient=coreapi.Client()schema=client.get("https://omabrowser.org/api/docs")# Interact with the API endpointaction=["hog","members"]params={"hog_id":...,"level":...,}result=client.action(schema,action,params=params)/api/hog/{hog_id}/similar_profile_hogs/Returns the HOGs with the most similar phylogenetic profiles.
The profiles are based on the number of duplications, losses andretained genes along the phylogenetic tree. Hence, the profiles arecomputed on the deepest level only and all sub-hogs ids will returnthe same similar HOGs.
Similar profile search is only useful for hogs that have a certainsize, i.e. 100 species. For smaller query HOGs, the result will simplybe empty.
The result contains for both, the query HOG as well as the similar HOGsa fieldin_species that contains a list of all species in which atleast one copy of the gene is present in the HOG.
The following parameters should be included in the URL path.
| Parameter | Description |
|---|---|
hog_idrequired | an unique identifier for a hog_group - either its hog id starting with "HOG:" or one of its member proteins in which case the specific HOG ID of that protein is used. (Example: HOG:0450897, P12345) |
The following parameters should be included as part of a URL query string.
| Parameter | Description |
|---|---|
max_results | the number of similar profiles to return. Must be a positive number less than 50. By default the 10 most HOGs with the most similar profiles are returned. (Example: 20) |
# Load the schema document$coreapigethttps://omabrowser.org/api/docs# Interact with the API endpoint$coreapiactionhogsimilar_profile_hogs-phog_id=...-pmax_results=...varcoreapi=window.coreapi// Loaded by `coreapi.js`varschema=window.schema// Loaded by `schema.js`// Initialize a clientvarclient=newcoreapi.Client()// Interact with the API endpointvaraction=["hog","similar_profile_hogs"]varparams={hog_id:...,max_results:...,}client.action(schema,action,params).then(function(result){// Return value is in 'result'})importcoreapi# Initialize a client & load the schema documentclient=coreapi.Client()schema=client.get("https://omabrowser.org/api/docs")# Interact with the API endpointaction=["hog","similar_profile_hogs"]params={"hog_id":...,"max_results":...,}result=client.action(schema,action,params=params)/api/pairs/{genome_id1}/{genome_id2}/List the pairwise relations among two genomes
The relations are orthologs in case the genomes aredifferent and close paralogs and homoeologs in casethey are the same.
By using the query_params 'chr1' and 'chr2', one can limitthe relations to a certain chromosome for one or bothgenomes. The id of the chromosome corresponds to the idsreturned by the genome endpoint.
The following parameters should be included in the URL path.
| Parameter | Description |
|---|---|
genome_id1required | an unique identifier for the first genome - either its ncbi taxon id or the UniProt species code |
genome_id2required | an unique identifier for the second genome - either its ncbi taxon id or the UniProt species code |
The following parameters should be included as part of a URL query string.
| Parameter | Description |
|---|---|
chr1 | id of the chromosome of interest in the first genome |
chr2 | id of the chromosome of interest in the second genome |
type | type of orthologs to use, can be either 'vps' or 'hogs' (default) |
xrefs | list of cross-references sources. Possible values are any subset of 'UniProtKB/SwissProt', UniProtKB/TrEMBL', 'EntrezGene', 'SourceID', 'SourceAC', 'Ensembl Gene' and 'RefSeq'. Default is no cross-references, but only OMA IDs. |
rel_type | limit relations to a certain type of relations, e.g. '1:1'. |
# Load the schema document$coreapigethttps://omabrowser.org/api/docs# Interact with the API endpoint$coreapiactionpairsread-pgenome_id1=...-pgenome_id2=...-pchr1=...-pchr2=...-ptype=...-pxrefs=...-prel_type=...varcoreapi=window.coreapi// Loaded by `coreapi.js`varschema=window.schema// Loaded by `schema.js`// Initialize a clientvarclient=newcoreapi.Client()// Interact with the API endpointvaraction=["pairs","read"]varparams={genome_id1:...,genome_id2:...,chr1:...,chr2:...,type:...,xrefs:...,rel_type:...,}client.action(schema,action,params).then(function(result){// Return value is in 'result'})importcoreapi# Initialize a client & load the schema documentclient=coreapi.Client()schema=client.get("https://omabrowser.org/api/docs")# Interact with the API endpointaction=["pairs","read"]params={"genome_id1":...,"genome_id2":...,"chr1":...,"chr2":...,"type":...,"xrefs":...,"rel_type":...,}result=client.action(schema,action,params=params)/api/protein/bulk_retrieve/Retrieve the information available for multiple protein IDs at once.
The POST request must contain a json-encoded list of IDs ofup to 1000 IDs for which the information is returned.
In case the ID is not unique or unknown, an empty element isreturned for this query element.
changed in verison 1.7: the endpoint returns now a list with tuples (query_id, target)instead of a simple list of proteins in the order of the query ids.
The request body should be"application/json" encoded, and should contain a single item.
| Parameter | Description |
|---|---|
idsrequired | A list of ids of proteins to retrieve |
# Load the schema document$coreapigethttps://omabrowser.org/api/docs# Interact with the API endpoint$coreapiactionproteinbulk_retrieve-pids=...varcoreapi=window.coreapi// Loaded by `coreapi.js`varschema=window.schema// Loaded by `schema.js`// Initialize a clientvarclient=newcoreapi.Client()// Interact with the API endpointvaraction=["protein","bulk_retrieve"]varparams={ids:...,}client.action(schema,action,params).then(function(result){// Return value is in 'result'})importcoreapi# Initialize a client & load the schema documentclient=coreapi.Client()schema=client.get("https://omabrowser.org/api/docs")# Interact with the API endpointaction=["protein","bulk_retrieve"]params={"ids":...,}result=client.action(schema,action,params=params)/api/protein/{entry_id}/Retrieve the information available for a protein entry.
The following parameters should be included in the URL path.
| Parameter | Description |
|---|---|
entry_idrequired | an unique identifier for a protein - either it entry number, omaid or its canonical id |
# Load the schema document$coreapigethttps://omabrowser.org/api/docs# Interact with the API endpoint$coreapiactionproteinread-pentry_id=...varcoreapi=window.coreapi// Loaded by `coreapi.js`varschema=window.schema// Loaded by `schema.js`// Initialize a clientvarclient=newcoreapi.Client()// Interact with the API endpointvaraction=["protein","read"]varparams={entry_id:...,}client.action(schema,action,params).then(function(result){// Return value is in 'result'})importcoreapi# Initialize a client & load the schema documentclient=coreapi.Client()schema=client.get("https://omabrowser.org/api/docs")# Interact with the API endpointaction=["protein","read"]params={"entry_id":...,}result=client.action(schema,action,params=params)/api/protein/{entry_id}/domains/List of the domains present in a protein.
The following parameters should be included in the URL path.
| Parameter | Description |
|---|---|
entry_idrequired | an unique identifier for a protein - either it entry number, omaid or its canonical id |
# Load the schema document$coreapigethttps://omabrowser.org/api/docs# Interact with the API endpoint$coreapiactionproteindomains-pentry_id=...varcoreapi=window.coreapi// Loaded by `coreapi.js`varschema=window.schema// Loaded by `schema.js`// Initialize a clientvarclient=newcoreapi.Client()// Interact with the API endpointvaraction=["protein","domains"]varparams={entry_id:...,}client.action(schema,action,params).then(function(result){// Return value is in 'result'})importcoreapi# Initialize a client & load the schema documentclient=coreapi.Client()schema=client.get("https://omabrowser.org/api/docs")# Interact with the API endpointaction=["protein","domains"]params={"entry_id":...,}result=client.action(schema,action,params=params)/api/protein/{entry_id}/gene_ontology/Gene ontology information available for a protein.
The following parameters should be included in the URL path.
| Parameter | Description |
|---|---|
entry_idrequired | an unique identifier for a protein - either its entry number, omaid or its canonical id |
# Load the schema document$coreapigethttps://omabrowser.org/api/docs# Interact with the API endpoint$coreapiactionproteingene_ontology-pentry_id=...varcoreapi=window.coreapi// Loaded by `coreapi.js`varschema=window.schema// Loaded by `schema.js`// Initialize a clientvarclient=newcoreapi.Client()// Interact with the API endpointvaraction=["protein","gene_ontology"]varparams={entry_id:...,}client.action(schema,action,params).then(function(result){// Return value is in 'result'})importcoreapi# Initialize a client & load the schema documentclient=coreapi.Client()schema=client.get("https://omabrowser.org/api/docs")# Interact with the API endpointaction=["protein","gene_ontology"]params={"entry_id":...,}result=client.action(schema,action,params=params)/api/protein/{entry_id}/hog_derived_orthologs/List of the orthologs derived from the hog for a given protein.
The following parameters should be included in the URL path.
| Parameter | Description |
|---|---|
entry_idrequired | an unique identifier for a protein - either it entry number, omaid or its canonical id |
# Load the schema document$coreapigethttps://omabrowser.org/api/docs# Interact with the API endpoint$coreapiactionproteinhog_derived_orthologs-pentry_id=...varcoreapi=window.coreapi// Loaded by `coreapi.js`varschema=window.schema// Loaded by `schema.js`// Initialize a clientvarclient=newcoreapi.Client()// Interact with the API endpointvaraction=["protein","hog_derived_orthologs"]varparams={entry_id:...,}client.action(schema,action,params).then(function(result){// Return value is in 'result'})importcoreapi# Initialize a client & load the schema documentclient=coreapi.Client()schema=client.get("https://omabrowser.org/api/docs")# Interact with the API endpointaction=["protein","hog_derived_orthologs"]params={"entry_id":...,}result=client.action(schema,action,params=params)/api/protein/{entry_id}/homoeologs/List of all the homoeologs for a given protein.
The following parameters should be included in the URL path.
| Parameter | Description |
|---|---|
entry_idrequired | an unique identifier for a protein - either its entry number, omaid or canonical id. |
# Load the schema document$coreapigethttps://omabrowser.org/api/docs# Interact with the API endpoint$coreapiactionproteinhomoeologs-pentry_id=...varcoreapi=window.coreapi// Loaded by `coreapi.js`varschema=window.schema// Loaded by `schema.js`// Initialize a clientvarclient=newcoreapi.Client()// Interact with the API endpointvaraction=["protein","homoeologs"]varparams={entry_id:...,}client.action(schema,action,params).then(function(result){// Return value is in 'result'})importcoreapi# Initialize a client & load the schema documentclient=coreapi.Client()schema=client.get("https://omabrowser.org/api/docs")# Interact with the API endpointaction=["protein","homoeologs"]params={"entry_id":...,}result=client.action(schema,action,params=params)/api/protein/{entry_id}/isoforms/List of isoforms for a protein.
The result contains a list of proteins with information ontheir locus and and exon structure for all the isoformsrecored in OMA belonging to the gene of the query protein.
The following parameters should be included in the URL path.
| Parameter | Description |
|---|---|
entry_idrequired | an unique identifier for a protein - either it entry number, omaid or its canonical id |
# Load the schema document$coreapigethttps://omabrowser.org/api/docs# Interact with the API endpoint$coreapiactionproteinisoforms-pentry_id=...varcoreapi=window.coreapi// Loaded by `coreapi.js`varschema=window.schema// Loaded by `schema.js`// Initialize a clientvarclient=newcoreapi.Client()// Interact with the API endpointvaraction=["protein","isoforms"]varparams={entry_id:...,}client.action(schema,action,params).then(function(result){// Return value is in 'result'})importcoreapi# Initialize a client & load the schema documentclient=coreapi.Client()schema=client.get("https://omabrowser.org/api/docs")# Interact with the API endpointaction=["protein","isoforms"]params={"entry_id":...,}result=client.action(schema,action,params=params)# Load the schema document$coreapigethttps://omabrowser.org/api/docs# Interact with the API endpoint$coreapiactionproteinontologyvarcoreapi=window.coreapi// Loaded by `coreapi.js`varschema=window.schema// Loaded by `schema.js`// Initialize a clientvarclient=newcoreapi.Client()// Interact with the API endpointvaraction=["protein","ontology"]client.action(schema,action).then(function(result){// Return value is in 'result'})importcoreapi# Initialize a client & load the schema documentclient=coreapi.Client()schema=client.get("https://omabrowser.org/api/docs")# Interact with the API endpointaction=["protein","ontology"]result=client.action(schema,action)/api/protein/{entry_id}/orthologs/List of all the identified pairwise orthologues for a protein. Filteringspecific subtypes of orthology is possible by specifying a rel_typequery parameter.
The following parameters should be included in the URL path.
| Parameter | Description |
|---|---|
entry_idrequired | an unique identifier for a protein - either it entry number, omaid or its canonical id |
The following parameters should be included as part of a URL query string.
| Parameter | Description |
|---|---|
rel_type | filter for orthologs of a specific relationship type only (Example: 1:1) |
# Load the schema document$coreapigethttps://omabrowser.org/api/docs# Interact with the API endpoint$coreapiactionproteinorthologs-pentry_id=...-prel_type=...varcoreapi=window.coreapi// Loaded by `coreapi.js`varschema=window.schema// Loaded by `schema.js`// Initialize a clientvarclient=newcoreapi.Client()// Interact with the API endpointvaraction=["protein","orthologs"]varparams={entry_id:...,rel_type:...,}client.action(schema,action,params).then(function(result){// Return value is in 'result'})importcoreapi# Initialize a client & load the schema documentclient=coreapi.Client()schema=client.get("https://omabrowser.org/api/docs")# Interact with the API endpointaction=["protein","orthologs"]params={"entry_id":...,"rel_type":...,}result=client.action(schema,action,params=params)/api/protein/{entry_id}/xref/List of cross-references for a protein.
The following parameters should be included in the URL path.
| Parameter | Description |
|---|---|
entry_idrequired | an unique identifier for a protein - either it entry number, omaid or its canonical id |
The following parameters should be included as part of a URL query string.
| Parameter | Description |
|---|---|
filter | a filter name to exclude some cross-references that are not relevant. Possible values are `all`, `exact`, `maindb`.- `all` does not apply any filter and returns all cross-references (default). - `exact` ignores all cross-references for which the protein sequence is not exactly the same as the one in the OMA browser. - `maindb` returns only the GeneName, UniProtKB, Ensembl Genes, RefSeq and EntrezGene and the SourceID cross-references. |
# Load the schema document$coreapigethttps://omabrowser.org/api/docs# Interact with the API endpoint$coreapiactionproteinxref-pentry_id=...-pfilter=...varcoreapi=window.coreapi// Loaded by `coreapi.js`varschema=window.schema// Loaded by `schema.js`// Initialize a clientvarclient=newcoreapi.Client()// Interact with the API endpointvaraction=["protein","xref"]varparams={entry_id:...,filter:...,}client.action(schema,action,params).then(function(result){// Return value is in 'result'})importcoreapi# Initialize a client & load the schema documentclient=coreapi.Client()schema=client.get("https://omabrowser.org/api/docs")# Interact with the API endpointaction=["protein","xref"]params={"entry_id":...,"filter":...,}result=client.action(schema,action,params=params)/api/sequence/Identify a protein sequence.
The following parameters should be included as part of a URL query string.
| Parameter | Description |
|---|---|
queryrequired | the sequence to be searched. |
search | argument to choose search strategy. Can be set to 'exact', 'approximate' or 'mixed'. Defaults to 'mixed', meaning first tries to find exact match. If no target can be found, uses approximate search strategy to identify query sequence in database. |
full_length | a boolean indicating whether or not for exact matches, the query sequence must be matching the full target sequence. By default, a partial exact match is also reported as exact match. |
# Load the schema document$coreapigethttps://omabrowser.org/api/docs# Interact with the API endpoint$coreapiactionsequencelist-pquery=...-psearch=...-pfull_length=...varcoreapi=window.coreapi// Loaded by `coreapi.js`varschema=window.schema// Loaded by `schema.js`// Initialize a clientvarclient=newcoreapi.Client()// Interact with the API endpointvaraction=["sequence","list"]varparams={query:...,search:...,full_length:...,}client.action(schema,action,params).then(function(result){// Return value is in 'result'})importcoreapi# Initialize a client & load the schema documentclient=coreapi.Client()schema=client.get("https://omabrowser.org/api/docs")# Interact with the API endpointaction=["sequence","list"]params={"query":...,"search":...,"full_length":...,}result=client.action(schema,action,params=params)/api/summary/shared_ancestry/{genome_id1}/{genome_id2}/Returns the fraction of shared ancestry between to species of interest.
The following parameters should be included in the URL path.
| Parameter | Description |
|---|---|
genome_id1required | a unique identifier for the first genome - either its ncbi taxon id or the UniProt species code |
genome_id2required | a unique identifier for the second genome - either its ncbi taxon id or the UniProt species code |
The following parameters should be included as part of a URL query string.
| Parameter | Description |
|---|---|
type | type of orthology information to compute the fraction of shared ancestry, either 'hogs' (default) or 'vps'. |
# Load the schema document$coreapigethttps://omabrowser.org/api/docs# Interact with the API endpoint$coreapiactionsummaryshared_ancestryread-pgenome_id1=...-pgenome_id2=...-ptype=...varcoreapi=window.coreapi// Loaded by `coreapi.js`varschema=window.schema// Loaded by `schema.js`// Initialize a clientvarclient=newcoreapi.Client()// Interact with the API endpointvaraction=["summary","shared_ancestry > read"]varparams={genome_id1:...,genome_id2:...,type:...,}client.action(schema,action,params).then(function(result){// Return value is in 'result'})importcoreapi# Initialize a client & load the schema documentclient=coreapi.Client()schema=client.get("https://omabrowser.org/api/docs")# Interact with the API endpointaction=["summary","shared_ancestry > read"]params={"genome_id1":...,"genome_id2":...,"type":...,}result=client.action(schema,action,params=params)/api/synteny/List of all the ancestral / extant "contigs" of an ancestral / extant genome.
Each contig will contain a graph with all the ancestral genes (HOGs) orthe extant genes and their neighbors as edges (order of ancestral/extant geneson "scaffolds/chromosomes")
The return value is a list of graph objects that consist of 'nodes' and'links' attributes.
{"nodes": [{"id":"HOG:C0594134.1a", ...}, {"id":"HOG:C0594135.3c", ...}, {"id":"HOG:C0600830.1c.3b", ...}], "links": [{"weight":15,"source":"HOG:C0594134.1a","target":"HOG:C0594135.3c"}, {"weight":15,"source":"HOG:C0594134.1a","target":"HOG:C0600830.1c.3b"}]}For extant genes, the gene IDs are the OMA IDs (e.g.HUMAN00007)
The following parameters should be included as part of a URL query string.
| Parameter | Description |
|---|---|
levelrequired | The taxonomic level at which the ancestral synteny should be retrieved. The level can be specified with its numeric taxid or the scientific name. For extant genomes, also the UniProt mnemonic species code can be used. |
evidence | The evidence value for the ancestral synteny graph. This is used for filtering. The evidence values are `linearized`< `parsimonious`< `any` By default, we only show the linearized graph (Example: linearized, parsimonious, any) |
break_circular_contigs | Some ancestral contigs end up being circles. For certain applications this poses a problem. By setting this argument to "yes" (default), the function will break the circle on the weakest edge, with "no" it will return the full linearized graph. Note that this parameter has no effect if the `evidence` parameter is not equal to "linearized". |
# Load the schema document$coreapigethttps://omabrowser.org/api/docs# Interact with the API endpoint$coreapiactionsyntenylist-plevel=...-pevidence=...-pbreak_circular_contigs=...varcoreapi=window.coreapi// Loaded by `coreapi.js`varschema=window.schema// Loaded by `schema.js`// Initialize a clientvarclient=newcoreapi.Client()// Interact with the API endpointvaraction=["synteny","list"]varparams={level:...,evidence:...,break_circular_contigs:...,}client.action(schema,action,params).then(function(result){// Return value is in 'result'})importcoreapi# Initialize a client & load the schema documentclient=coreapi.Client()schema=client.get("https://omabrowser.org/api/docs")# Interact with the API endpointaction=["synteny","list"]params={"level":...,"evidence":...,"break_circular_contigs":...,}result=client.action(schema,action,params=params)/api/synteny/{hog_id}/Returns the ancestral synteny graph around a reference hog at a given taxonomic level.
The following parameters should be included in the URL path.
| Parameter | Description |
|---|---|
hog_id / protein_idrequired | a unique identifier for a hog_group starting with "HOG:" for ancestral synteny levels, or a unique protein ID (e.g. YEAST00012) for an extant species synteny query. (Example: HOG:0450897, HUMAN01330) |
The following parameters should be included as part of a URL query string.
| Parameter | Description |
|---|---|
level | the taxonomic level at which the synteny graph should be extracted. If not specified, the deepest level of the given HOG is used. The level can bei either a scientific name or the numeric taxonomy identifier (Example: Primates, 9604) |
evidence | The evidence value for the ancestral synteny graph. This is used for filtering. The evidence values are `linearized`< `parsimonious`< `any` (Example: parsimonious) |
context | the size of the graph around the query HOG. By default the HOGs which are at most 2 edges apart from the query HOG are returned. |
break_circular_contigs | Some ancestral contigs end up being circles. For certain applications this poses a problem. By setting this argument to "yes" (default), the function will break the circle on the weakest edge, with "no" it will return the full linearized graph. Note that this parameter has no effect if the `evidence` parameter is not equal to "linearized". |
# Load the schema document$coreapigethttps://omabrowser.org/api/docs# Interact with the API endpoint$coreapiactionsyntenyread-phog_id/protein_id=...-plevel=...-pevidence=...-pcontext=...-pbreak_circular_contigs=...varcoreapi=window.coreapi// Loaded by `coreapi.js`varschema=window.schema// Loaded by `schema.js`// Initialize a clientvarclient=newcoreapi.Client()// Interact with the API endpointvaraction=["synteny","read"]varparams={hog_id/protein_id:...,level:...,evidence:...,context:...,break_circular_contigs:...,}client.action(schema,action,params).then(function(result){// Return value is in 'result'})importcoreapi# Initialize a client & load the schema documentclient=coreapi.Client()schema=client.get("https://omabrowser.org/api/docs")# Interact with the API endpointaction=["synteny","read"]params={"hog_id / protein_id":...,"level":...,"evidence":...,"context":...,"break_circular_contigs":...,}result=client.action(schema,action,params=params)/api/taxonomy/Retrieve the taxonomic tree that is available in the current release.
The following parameters should be included as part of a URL query string.
| Parameter | Description |
|---|---|
type | the type of the returned data - either dictionary (default), newick or phyloxml. |
members | list of members to get the induced taxonomy from. The list is supposed to be a comma-separated list. Member IDs can be either their ncbi taxon IDs or their UniProt species codes - they just have to be consistent. |
collapse | whether or not taxonomic levels with a single child should be collapsed or not. Defaults to yes. |
newick_leaf_label | type of data to store in the leaf nodes of the newick tree. Must be one of ("sciname", "species_code") Defaults to "sciname" if not specified. |
newick_internal_label | type of data to store in the internal nodes of the newick tree. Must be one of ("sciname", "taxid" or "None"). Defaults to "sciname" if not specified. |
newick_quote_labels | Whether or not to quote the labels in the newick tree. If not, spaces are replaced by '_' characters. Defaults to no. |
# Load the schema document$coreapigethttps://omabrowser.org/api/docs# Interact with the API endpoint$coreapiactiontaxonomylist-ptype=...-pmembers=...-pcollapse=...-pnewick_leaf_label=...-pnewick_internal_label=...-pnewick_quote_labels=...varcoreapi=window.coreapi// Loaded by `coreapi.js`varschema=window.schema// Loaded by `schema.js`// Initialize a clientvarclient=newcoreapi.Client()// Interact with the API endpointvaraction=["taxonomy","list"]varparams={type:...,members:...,collapse:...,newick_leaf_label:...,newick_internal_label:...,newick_quote_labels:...,}client.action(schema,action,params).then(function(result){// Return value is in 'result'})importcoreapi# Initialize a client & load the schema documentclient=coreapi.Client()schema=client.get("https://omabrowser.org/api/docs")# Interact with the API endpointaction=["taxonomy","list"]params={"type":...,"members":...,"collapse":...,"newick_leaf_label":...,"newick_internal_label":...,"newick_quote_labels":...,}result=client.action(schema,action,params=params)/api/taxonomy/{root_id}/Retrieve the subtree rooted at the taxonomic level indicated.
The following parameters should be included in the URL path.
| Parameter | Description |
|---|---|
root_idrequired | either the taxon id, species name or the 5 letter UniProt species code for a root taxonomic level |
The following parameters should be included as part of a URL query string.
| Parameter | Description |
|---|---|
type | the type of the returned data - either dictionary (default) or newick. |
collapse | whether or not taxonomic levels with a single child should be collapsed or not. Defaults to yes. |
# Load the schema document$coreapigethttps://omabrowser.org/api/docs# Interact with the API endpoint$coreapiactiontaxonomyread-proot_id=...-ptype=...-pcollapse=...varcoreapi=window.coreapi// Loaded by `coreapi.js`varschema=window.schema// Loaded by `schema.js`// Initialize a clientvarclient=newcoreapi.Client()// Interact with the API endpointvaraction=["taxonomy","read"]varparams={root_id:...,type:...,collapse:...,}client.action(schema,action,params).then(function(result){// Return value is in 'result'})importcoreapi# Initialize a client & load the schema documentclient=coreapi.Client()schema=client.get("https://omabrowser.org/api/docs")# Interact with the API endpointaction=["taxonomy","read"]params={"root_id":...,"type":...,"collapse":...,}result=client.action(schema,action,params=params)/api/version/Returns the version information of the api andthe underlying oma browser database release.
# Load the schema document$coreapigethttps://omabrowser.org/api/docs# Interact with the API endpoint$coreapiactionversionlistvarcoreapi=window.coreapi// Loaded by `coreapi.js`varschema=window.schema// Loaded by `schema.js`// Initialize a clientvarclient=newcoreapi.Client()// Interact with the API endpointvaraction=["version","list"]client.action(schema,action).then(function(result){// Return value is in 'result'})importcoreapi# Initialize a client & load the schema documentclient=coreapi.Client()schema=client.get("https://omabrowser.org/api/docs")# Interact with the API endpointaction=["version","list"]result=client.action(schema,action)/api/xref/List all the crossreferences that match a certain pattern.
The following parameters should be included as part of a URL query string.
| Parameter | Description |
|---|---|
search | the pattern to be searched for. The pattern must be at least 3 characters long in order to return a hit. |
# Load the schema document$coreapigethttps://omabrowser.org/api/docs# Interact with the API endpoint$coreapiactionxreflist-psearch=...varcoreapi=window.coreapi// Loaded by `coreapi.js`varschema=window.schema// Loaded by `schema.js`// Initialize a clientvarclient=newcoreapi.Client()// Interact with the API endpointvaraction=["xref","list"]varparams={search:...,}client.action(schema,action,params).then(function(result){// Return value is in 'result'})importcoreapi# Initialize a client & load the schema documentclient=coreapi.Client()schema=client.get("https://omabrowser.org/api/docs")# Interact with the API endpointaction=["xref","list"]params={"search":...,}result=client.action(schema,action,params=params)