REST URLs for fetching XREFs
ENA provides cross-references to external data resources deemed to be important to the user. External resources include services operated by colleagues at the EBI (such as UniProt and Ensembl) and those operated outside the EBI (including SILVA and RFAM). In most cases, we operate a close collaboration with the resources to which we cross-refer, in order to maximise the quality and appropriateness of the cross-references.
The update frequency of each source is dependent on their own release cycle and/or internal processes, with ENA supporting updates as frequently as once a week. Cross-references in flat files are still tied to the assembled and annotated release at ENA, so may not display the most recent cross-references for a record. This REST service provides support for users to obtain the most up-to-date cross-reference mappings, ahead of the next release.
Cross Reference Retrieval Services
- Graphical Search Interface: https://www.ebi.ac.uk/ena/browser/xref
- RESTful API: https://www.ebi.ac.uk/ena/xref/rest
Available cross-reference sources
A list of all cross-reference sources available in this service can be retrieved using the following URLs in Tab Separated format or in JSON:
The source identifier and description are returned in a tab separated text format. The source identifier should be used when retrieving cross-references using one of the options listed below.
Available ENA targets
The target identifier and description are returned in a tab separated text format. The target identifier should be used when retrieving cross-references using one of the options listed below. Please note that at this time, not all targets have cross-references. Most cross-reference sources also have mappings to only one or two ENA targets.
There are three ways to fetch cross-references from this service. Each of these return the following columns in a tab separated text format: source, source primary accession, source secondary accession, target, target primary accession, target secondary accession. Not all cross-reference sources have secondary accessions. Only coding and noncoding targets have secondary accessions (both list the parent sequence accession as the secondary accession).
The examples below use the JSON format URLs (/json/), but you can use the /tsv/ URLs if you so wish.
All cross-references for a single source
All cross-reference mappings for a single source can be fetched. This can either be all cross-references to a single target type, or all cross-references for the source. The URL to use for this is:
All cross-references for a single source ID
All cross-reference mappings for a single source id can be fetched using the following URL. This can either return all mappings between this source record and ENA objects or be restricted to a single target.
All cross-references for a single ENA object
All cross-reference mappings available for a single ENA object can be retrieved using the following URL. This can either return all mappings to this ENA record or it can be restricted to a single cross-reference source.
Cross-references with attributes
Some cross-reference sources have publicly available attributes, that is additional information about the record other than an ID to an external database source. These can be retrieved using the expanded parameter and setting the value to true.
Each attribute will be provided as additional columns with the names for the attributes supplied in the column headers. If the expanded parameter is used for a cross-reference source without attributes, it will be ignored and the default columns will be returned.