Linking in to Ensembl
Attaching a file via URL
You can quickly and easily attach any supported file format to Region in Detail using the following URL pattern:
Note that if your file URL contains semicolons, ampersands (&) or equals signs, these will need to be URL-encoded.
For attaching data to other images or pages, see the advanced customisation tips below.
Linking on a stable ID
If you simply wish to link to a gene, transcript, protein or gene tree page, particularly for automated links, you can do so using the following template:
As you can see, you don't need to know the name of the species that the ID belongs to; the website will work that out automatically based on the 3-6 letter prefix.
Note however that you do have to use Ensembl stable IDs; you cannot substitute a gene symbol such as FOXP2, as that is found in many species. To link on a gene symbol, see the standard URL structure section, below.
Valid ID types are:
- Gene: ENS[species code]G[number]
- Transcript: ENS[species code]T[number]
- Protein: ENS[species code]P[number]
- Gene tree: ENS[species code]GT[number]
The only site this type of URL will not work with is Ensembl Pre since, by their nature, most preview species have no genebuild and thus no stable IDs.
More about Ensembl URLs
URLs for Ensembl views take the format:
Any combination of the gene, transcript and genomic region may be specified. For example, the following all take the user to the genomic region surrounding the human gene BRCA1:
Views based on a gene, transcript or variation need the parameter of that type in their URL - a location alone is insufficient:
- RIGHT: http://www.ensembl.org/Homo_sapiens/Gene/Summary?g=ENSG00000012048
- WRONG! http://www.ensembl.org/Homo_sapiens/Gene/Summary?r=17:38449840-38530994
Advanced link customisation
Many of the customisation options available to users of the website in the Control Panel can be manipulated using specially constructed URLs. This allows configuration settings to be shared with colleagues, for example to highlight a particular data track. This includes:
- Configuring options for a page
- Configuring a panel/image (changing the way tracks are rendered)
- Attaching external data via URL, without using the Control Panel
These are accomplished in a similar, systematic way. Extra parameters are appended to the URL for the relevant page:
Or when setting multiple values:
Or when setting multiple different types of parameter:
Global Page Settings
Global page settings are changed using the config key. For example, to turn off the top image on Location > Region in detail:
Appending this to the URL for the Region in detail page, the final URL is:
To link directly to the Exon Intron markup panel (Transcript > Exons), to show full introns, only 60bp flanking sequence AND turn the display to be 60bp wide:
To change configuration for an individual panel add a parameter referring to the panel:
- Location > Region in detail: contigviewtop and contigviewbottom
- Location > Region overview: cytoview
Options are again specificed in a comma separated list, where the left hand side of each "=" is the name of the track, and the right hand side is the name of the "renderer" to use - the latter depends on the type of track.
Track names are systematically named. The following example identifies a track with Ensembl transcripts from the core Ensembl database:
Renderers depend on the type of track:
- Transcripts: transcript_label, transcript_nolabel, collapsed_label, collapsed_nolabel or off
- Alignment features: normal, half_height, stack, unlimited, ungrouped or off
Example - configure a track
To collapse the Ensembl genes track down to a single line per gene AND turn off the top panel in Location > Region in detail:
Attaching External Data
To attach URL data, follow the procedure above for configuring the appropriate panel, using special track names to identify the data source. These special names are of the format:
where source is the location of the external data.
IMPORTANT: You must encode any = & or ; characters in your URL for the attachment to work correctly.
Renderers are the same as for alignment tracks (see above), or for wiggle/graph data, either 'off' or 'signal'.
Examples - attach external data
To attach an example data file by URL and display the features with the default renderer:
To attach an example data file by URL and display the features in a half_height style:
Note on bedGraph format If attaching a bedGraph file, please add the parameter 'format=bedGraph' to the URL, e.g.