# Ensembl

> Look up genes, sequences and variants from a workflow. Ensembl is the genome database of EMBL's European Bioinformatics Institute: the reference gene set for human and hundreds of other vertebrates, the plants, insects and fungi of Ensembl Genomes, and the Variant Effect Predictor that clinical and research labs run their sequencing results through. Turn a column of gene symbols or versioned IDs into names, positions and biotypes. Read what a list of variants does, with SIFT, PolyPhen and AlphaMissense predictions, gnomAD frequencies and ClinVar verdicts. Translate variants between rsIDs, HGVS, SPDI and VCF, move coordinates between GRCh37 and GRCh38, fetch protein and DNA sequences, find a gene's counterparts in other species, and list the diseases and traits tied to a gene or a variant. Human on either build and every species Ensembl covers. No account or API key required.

App · Research & Academia · 17 actions. Web page: https://docs.lodol.com/docs/integrations/ensembl

## Actions

### Check Ensembl IDs are current

Check a list of Ensembl IDs against the current release: which are still current, which have moved on to a newer version, and which have been retired, with the release they were last seen in and, where Ensembl knows one, what replaced them. Up to a thousand at a time, versions and all. Run it over IDs from an old spreadsheet or paper before trusting them.

**Inputs**

- Ensembl IDs (`ids`, list, required): Gene, transcript or protein IDs, up to a thousand, with or without versions. A version given is compared with the current one.

**Outputs**

- `count` (number): IDs Ensembl knows
- `current` (number): How many are current
- `ids` (list): One row per ID, in the order given
- `new_version` (number): How many were given at an older version
- `not_found` (list): IDs Ensembl has never issued
- `requested` (number): IDs given
- `retired` (number): How many are retired

**Example output**

```json
{
  "count": 2,
  "current": 0,
  "ids": [
    {
      "assembly": "GRCh38",
      "given_version": 12,
      "id": "ENSG00000157764",
      "is_current": true,
      "last_release": 116,
      "latest": "ENSG00000157764.16",
      "latest_version": 16,
      "query": "ENSG00000157764.12",
      "replacements": [],
      "status": "new_version",
      "status_label": "Current, at a newer version",
      "type": "gene",
      "url": "https://www.ensembl.org/id/ENSG00000157764"
    },
    {
      "assembly": "GRCh37",
      "given_version": null,
      "id": "ENSG00000245236",
      "is_current": false,
      "last_release": 57,
      "latest": "ENSG00000245236.1",
      "latest_version": 1,
      "query": "ENSG00000245236",
      "replacements": [],
      "status": "retired",
      "status_label": "Retired",
      "type": "gene",
      "url": null
    }
  ],
  "new_version": 1,
  "not_found": [],
  "requested": 2,
  "retired": 1
}
```

### Convert coordinates between genome builds

Move positions and regions from one build of a genome to another, most often from GRCh37 (hg19), which older pipelines and many clinical reports still use, to the current GRCh38, or back. Up to fifty at a time. A region that the two builds assemble differently can come back in pieces, and says so; one in sequence the other build does not have comes back in its own list rather than at a wrong position.

**Inputs**

- Positions or regions (`regions`, list, required): What to convert: positions (7:140453136) or regions (7:140453136-140453236, chr7:140,453,136-140,453,236), up to fifty.
- From build (`from_assembly`, text): The build the positions are on. GRCh37 and hg19 are the same thing; so are GRCh38 and hg38. Mouse builds work too, such as GRCm38 (mm10). Default: `GRCh37`.
- To build (`to_assembly`, text): The build to move them to. GRCh38 is the current human build; GRCm39 the current mouse one. Default: `GRCh38`.
- Species (`species`, text): Whose genome the builds belong to. Human is the default; pick mouse to convert between GRCm38 and GRCm39. Default: `homo_sapiens`.

**Outputs**

- `count` (number): How many converted
- `from_assembly` (text): Build converted from
- `not_mapped` (list): What had no counterpart on the other build
- `regions` (list): One per position or region converted, in order
- `requested` (number): How many were given
- `to_assembly` (text): Build converted to

**Example output**

```json
{
  "count": 1,
  "from_assembly": "GRCh37",
  "not_mapped": [],
  "regions": [
    {
      "chromosome": "7",
      "end": 140753336,
      "from_region": "7:140453136-140453136",
      "is_complete": true,
      "is_split": false,
      "location": "7:140753336",
      "pieces": [
        {
          "chromosome": "7",
          "end": 140753336,
          "from_end": 140453136,
          "from_start": 140453136,
          "location": "7:140753336",
          "start": 140753336,
          "strand": 1
        }
      ],
      "query": "7:140453136",
      "start": 140753336,
      "strand": 1
    }
  ],
  "requested": 1,
  "to_assembly": "GRCh38"
}
```

### Find a gene

Turn whatever names a gene into the gene itself. Give a symbol, an Ensembl ID with or without its version, a transcript or protein ID, a former name, or an ID from UniProt, NCBI Gene, HGNC or RefSeq, and get back its Ensembl ID, its official symbol and full name, which chromosome it sits on and where, what kind of gene it is and its main transcript. Turn on transcripts to list every isoform with its protein, its length and whether it is the MANE Select transcript clinical reports use. This is the step to put first: the ID it returns is what every other genomics tool asks for.

**Inputs**

- Gene (`gene`, text, required): The gene to read. Give whatever you have: a symbol (BRCA2), an Ensembl ID with or without its version (ENSG00000139618.19), a transcript or protein ID, which is read as the gene it belongs to, a former name or alias (HER2), or another database's ID for it, such as UniProt (P51587). The answer says which reading found it. Aliases and other databases' IDs go through a slower index, which can take most of a minute when Ensembl is busy.
- Species (`species`, text): Which genome to read. Human on GRCh38, the current build, is the default. Human on GRCh37 (hg19) is listed beside it, for positions and variants written against the older build. Any other species Ensembl covers can be picked or typed, by scientific name (mus_musculus), common name (mouse) or taxonomy number (10090). Default: `homo_sapiens`.
- Include transcripts (`include_transcripts`, true/false): List every transcript of the gene as well, main one first, each with its protein and length. For human this also names the MANE Select transcript and its RefSeq twin. Default: `false`.

**Outputs**

- `gene` (object): The gene
- `given_id` (text): The transcript or protein named, when one was
- `given_type` (text): transcript or protein, when one was named
- `matched_by` (text): How it was recognised: ensembl_id, symbol, stable_id (the species' own kind of ID) or other_name (an alias, a former symbol or another database's ID)
- `matched_by_label` (text): That reading in words, for showing to somebody
- `other_matches` (list): Other genes an alias also points at. Worth a look when matched_by is other_name
- `query` (text): What was asked for, as given
- `transcripts` (list): Every transcript, when asked for

**Example output**

```json
{
  "gene": {
    "assembly": "GRCh38",
    "biotype": "protein_coding",
    "canonical_transcript": "ENST00000380152",
    "canonical_transcript_version": 8,
    "chromosome": "13",
    "description": "BRCA2 DNA repair associated",
    "description_source": "HGNC Symbol",
    "description_source_id": "HGNC:1101",
    "end": 32400268,
    "id": "ENSG00000139618",
    "length": 85183,
    "location": "13:32315086-32400268",
    "mane_select_refseq": "NM_000059.4",
    "mane_select_transcript": "ENST00000380152",
    "species": "homo_sapiens",
    "start": 32315086,
    "strand": 1,
    "symbol": "BRCA2",
    "transcript_count": 19,
    "url": "https://www.ensembl.org/id/ENSG00000139618",
    "version": 19
  },
  "given_id": null,
  "given_type": null,
  "matched_by": "symbol",
  "matched_by_label": "Gene symbol",
  "other_matches": [],
  "query": "BRCA2",
  "transcripts": [
    {
      "biotype": "protein_coding",
      "chromosome": "13",
      "end": 32400268,
      "exon_count": 27,
      "id": "ENST00000380152",
      "is_canonical": true,
      "is_mane_select": true,
      "length": 11954,
      "location": "13:32315508-32400268",
      "mane_plus_clinical_refseq": null,
      "mane_select_refseq": "NM_000059.4",
      "name": "BRCA2-201",
      "protein_id": "ENSP00000369497",
      "protein_length": 3418,
      "start": 32315508,
      "strand": 1,
      "url": "https://www.ensembl.org/id/ENST00000380152",
      "version": 8
    }
  ]
}
```

### Find a protein or transcript position in the genome

Find where a position along a protein or a transcript lies on the chromosome: which three bases code amino acid 600 of BRAF, or where a domain from residue 100 to 300 sits in the genome. A codon that straddles an intron comes back in two pieces. Protein numbering belongs to one isoform, so a gene named by symbol is read on its main transcript, the one clinical numbering uses.

**Inputs**

- Protein, transcript or gene (`feature`, text, required): What the positions count along: a protein or transcript ID, or a gene, which is read on its main transcript and the protein it makes.
- Positions (`positions`, text, required): A position or a range along it, counting from 1: 600, or 100-300. A protein change such as V600E or p.Val600Glu is read as its position.
- Counting along (`coordinate_type`, text): What the positions count. Amino acids along the protein, as in V600E. Bases along the coding sequence, as in c.1799. Bases along the whole transcript, untranslated start included. One of: `protein` (Amino acids along the protein), `cds` (Bases along the coding sequence), `cdna` (Bases along the transcript). Default: `protein`.
- Species (`species`, text): Which genome to read. Human on GRCh38, the current build, is the default. Human on GRCh37 (hg19) is listed beside it, for positions and variants written against the older build. Any other species Ensembl covers can be picked or typed, by scientific name (mus_musculus), common name (mouse) or taxonomy number (10090). Default: `homo_sapiens`.

**Outputs**

- `assembly` (text): Genome build
- `chromosome` (text): Chromosome or scaffold name
- `coordinate_type` (text): protein, cds or cdna
- `coordinate_type_label` (text): In words
- `count` (number): How many pieces
- `end` (number): Last base, included
- `feature_id` (text): The protein or transcript the positions were read on
- `gene_id` (text): The gene, when named
- `gene_symbol` (text): Its symbol
- `location` (text): The same place written as chromosome:start-end
- `matched_by` (text): How it was recognised: ensembl_id, symbol, stable_id (the species' own kind of ID) or other_name (an alias, a former symbol or another database's ID)
- `matched_by_label` (text): That reading in words, for showing to somebody
- `pieces` (list): Each stretch of genome, more than one across an intron
- `positions` (text): As read
- `query` (text): What was asked for, as given
- `start` (number): First base, counting from 1
- `strand` (number): 1 for the forward strand, -1 for the reverse
- `url` (text): The place in Ensembl's browser

**Example output**

```json
{
  "assembly": "GRCh38",
  "chromosome": "7",
  "coordinate_type": "protein",
  "coordinate_type_label": "Amino acids along the protein",
  "count": 1,
  "end": 140753337,
  "feature_id": "ENSP00000493543",
  "gene_id": "ENSG00000157764",
  "gene_symbol": "BRAF",
  "location": "7:140753335-140753337",
  "matched_by": "symbol",
  "matched_by_label": "Gene symbol",
  "pieces": [
    {
      "assembly": "GRCh38",
      "chromosome": "7",
      "end": 140753337,
      "is_gap": false,
      "location": "7:140753335-140753337",
      "start": 140753335,
      "strand": -1
    }
  ],
  "positions": "600",
  "query": "BRAF",
  "start": 140753335,
  "strand": -1,
  "url": "https://www.ensembl.org/Homo_sapiens/Location/View?r=7:140753335-140753337"
}
```

### Find the genes and variants behind a trait

Start from a disease or trait and find what studies have tied to it: the GWAS catalog's hits with their p-values and effect sizes, ClinVar's pathogenic variants, and the genes named. Give the trait in words, such as type 2 diabetes, or as an ontology term (EFO, HP, MONDO, Orphanet) to be exact. The strongest results come first, with a tally of the genes named most often.

**Inputs**

- Disease or trait (`phenotype`, text, required): The trait, in words as the studies name it (coffee consumption, type 2 diabetes), or an ontology term (EFO:0004330, HP:0001250, MONDO:0005148), which is exact where words are not.
- Species (`species`, text): Which genome to read. Human on GRCh38, the current build, is the default. Human on GRCh37 (hg19) is listed beside it, for positions and variants written against the older build. Any other species Ensembl covers can be picked or typed, by scientific name (mus_musculus), common name (mouse) or taxonomy number (10090). Default: `homo_sapiens`.
- Include narrower terms (`include_child_terms`, true/false): Also return what is filed under narrower terms of an ontology term, such as each kind of diabetes under diabetes. Can be very large. Default: `false`.
- Strongest only, p-value below (`max_p_value`, number): Keep only results at least this significant. 5e-8 is the usual threshold for a genome wide hit. Leave at 1 to keep everything, including records with no p-value. From 0 to 1. Default: `1`.
- How many to return (`limit`, number): How many results to return, strongest first. The tally of genes counts them all. From 1 to 5000. Default: `200`.

**Outputs**

- `associations` (list): Strongest first
- `count` (number): How many associations in all
- `genes` (list): Genes named, most often first
- `phenotype` (text): As given
- `searched_by` (text): term or accession
- `sources` (object): Results per source
- `truncated` (true/false): True when cut at the limit

**Example output**

```json
{
  "associations": [
    {
      "chromosome": "15",
      "clinical_significance": null,
      "effect": "0.0685684 unit decrease",
      "end": 74735539,
      "feature_type": "variant",
      "genes": [],
      "id": "rs2472297",
      "location": "15:74735539-74735539",
      "ontology_accession": "EFO:0004330",
      "p_value": 1e-182,
      "risk_allele": "C",
      "source": "NHGRI-EBI GWAS catalog",
      "start": 74735539,
      "strand": null,
      "study": "PMID:32193382",
      "trait": "Coffee consumption (cups per day)",
      "url": "https://www.ensembl.org/Homo_sapiens/Variation/Explore?v=rs2472297"
    }
  ],
  "count": 133,
  "genes": [
    {
      "associations": 12,
      "gene": "AHR"
    },
    {
      "associations": 7,
      "gene": "CYP1A1"
    }
  ],
  "phenotype": "EFO:0004330",
  "searched_by": "accession",
  "sources": {
    "NHGRI-EBI GWAS catalog": 133
  },
  "truncated": true
}
```

### Find the same gene in other species

Find a gene's counterpart in mouse, zebrafish, fly or any of the hundreds of other species Ensembl compares, which is the step between a human disease gene and the model organism to study it in. Each comes back with its ID and symbol, whether it is a clean one to one match or one of several copies, how much of the protein is identical, and the last ancestor the two species shared. Ask for paralogues instead to find the gene's relatives within its own species.

**Inputs**

- Gene (`gene`, text, required): The gene to read. Give whatever you have: a symbol (BRCA2), an Ensembl ID with or without its version (ENSG00000139618.19), a transcript or protein ID, which is read as the gene it belongs to, a former name or alias (HER2), or another database's ID for it, such as UniProt (P51587). The answer says which reading found it. Aliases and other databases' IDs go through a slower index, which can take most of a minute when Ensembl is busy.
- Species (`species`, text): Which genome to read. Human on GRCh38, the current build, is the default. Human on GRCh37 (hg19) is listed beside it, for positions and variants written against the older build. Any other species Ensembl covers can be picked or typed, by scientific name (mus_musculus), common name (mouse) or taxonomy number (10090). Default: `homo_sapiens`.
- In these species (`target_species`, list): Only look in these species. Leave empty to search every species Ensembl compares, which is slower. Names as in the species picker: mus_musculus, danio_rerio, drosophila_melanogaster.
- Look for (`relationship`, text): Orthologues are the same gene in other species, descended from one gene in their common ancestor. Paralogues are copies within one species, from a duplication, which often share a function. One of: `orthologues` (The same gene in other species), `paralogues` (Related genes in the same species), `all` (Both). Default: `orthologues`.
- How many to return (`limit`, number): How many to return, one to one matches first and then the most similar. From 1 to 500. Default: `100`.

**Outputs**

- `count` (number): How many came back
- `gene_id` (text): The gene compared
- `gene_symbol` (text): Its symbol
- `homologues` (list): Closest first
- `matched_by` (text): How it was recognised: ensembl_id, symbol, stable_id (the species' own kind of ID) or other_name (an alias, a former symbol or another database's ID)
- `matched_by_label` (text): That reading in words, for showing to somebody
- `query` (text): What was asked for, as given
- `relationship` (text): What was looked for
- `species` (text): Its species
- `total` (number): How many there are in all

**Example output**

```json
{
  "count": 1,
  "gene_id": "ENSG00000139618",
  "gene_symbol": "BRCA2",
  "homologues": [
    {
      "dn_ds": null,
      "gene_id": "ENSMUSG00000041147",
      "is_one_to_one": true,
      "percent_identity": 58.6362,
      "percent_identity_back": 57.1094,
      "percent_similar": 72.1838,
      "protein_id": "ENSMUSP00000144150",
      "relationship": "ortholog_one2one",
      "relationship_label": "One to one orthologue",
      "shared_ancestor": "Euarchontoglires",
      "species": "mus_musculus",
      "symbol": "Brca2",
      "taxon_id": 10090,
      "url": "https://www.ensembl.org/id/ENSMUSG00000041147"
    }
  ],
  "matched_by": "symbol",
  "matched_by_label": "Gene symbol",
  "query": "BRCA2",
  "relationship": "orthologues",
  "species": "homo_sapiens",
  "total": 1
}
```

### Find variants in linkage disequilibrium

Find the variants inherited together with one variant in a population, which is the first step after a GWAS hit: the variant a study reports is often only a marker for a neighbour that does the damage. Each linked variant comes back with how tightly it travels with the first (r squared and D prime), where it is, what it does and ClinVar's verdict, closest first. Name a second variant instead to measure the link between the two. Computed on the 1000 Genomes populations.

**Inputs**

- Variant (`variant`, text, required): The variant, as an rsID (rs1042779), or in another notation, which is looked up under its rsID.
- Population (`population`, text): The population to measure linkage in, which matters: variants that travel together in one ancestry often do not in another. Pick the one closest to the study's own participants. One of: `1000GENOMES:phase_3:EUR` (European (EUR)), `1000GENOMES:phase_3:AFR` (African (AFR)), `1000GENOMES:phase_3:AMR` (American (AMR)), `1000GENOMES:phase_3:EAS` (East Asian (EAS)), `1000GENOMES:phase_3:SAS` (South Asian (SAS)), `1000GENOMES:phase_3:ACB` (African Caribbean in Barbados (ACB)), `1000GENOMES:phase_3:ASW` (African Ancestry in Southwest US (ASW)), `1000GENOMES:phase_3:BEB` (Bengali in Bangladesh (BEB)), `1000GENOMES:phase_3:CDX` (Chinese Dai in Xishuangbanna, China (CDX)), `1000GENOMES:phase_3:CEU` (Utah residents with Northern and Western European ancestry (CEU)), and 21 more. Default: `1000GENOMES:phase_3:EUR`.
- Species (`species`, text): Which genome to read. Human on GRCh38, the current build, is the default. Human on GRCh37 (hg19) is listed beside it, for positions and variants written against the older build. Any other species Ensembl covers can be picked or typed, by scientific name (mus_musculus), common name (mouse) or taxonomy number (10090). Default: `homo_sapiens`.
- Minimum r squared (`min_r2`, number): How tightly a variant must travel with the first to be listed, from 0 to 1. 0.8 is the usual cut for a proxy that can stand in for it. From 0 to 1. Default: `0.8`.
- Window (kb) (`window_kb`, number): How far either side to look, in thousands of bases, up to 500. Linkage rarely reaches further. From 1 to 500. Default: `500`.
- Compare with (`other_variant`, text): A second variant, to measure the link between the two rather than search the neighbourhood.

**Outputs**

- `count` (number): How many linked
- `linked` (list): Most tightly linked first
- `min_r2` (number): Threshold used
- `population` (text): Population used
- `population_label` (text): In words
- `query` (text): As given
- `variant` (text): The variant's rsID
- `window_kb` (number): Window used

**Example output**

```json
{
  "count": 1,
  "linked": [
    {
      "chromosome": "3",
      "clinical_significance": [],
      "consequence": "intron_variant",
      "consequence_label": "Falls in an intron",
      "d_prime": 0.995827,
      "location": "3:52777156",
      "r2": 0.983489,
      "start": 52777156,
      "url": "https://www.ensembl.org/Homo_sapiens/Variation/Explore?v=rs6792369",
      "variant": "rs6792369"
    }
  ],
  "min_r2": 0.8,
  "population": "1000GENOMES:phase_3:EUR",
  "population_label": "European (EUR)",
  "query": "rs1042779",
  "variant": "rs1042779",
  "window_kb": 500
}
```

### Get a gene's IDs in other databases

Get the same gene's IDs everywhere else, which is how records from different tools are joined: HGNC, NCBI Gene, UniProt, RefSeq transcripts and proteins, OMIM, CCDS and the UCSC browser, with the gene's former names, its Reactome pathways, its Gene Ontology terms and the protein structures solved for it. The IDs people join on most are also given on their own, ready to use.

**Inputs**

- Gene (`gene`, text, required): The gene to read. Give whatever you have: a symbol (BRCA2), an Ensembl ID with or without its version (ENSG00000139618.19), a transcript or protein ID, which is read as the gene it belongs to, a former name or alias (HER2), or another database's ID for it, such as UniProt (P51587). The answer says which reading found it. Aliases and other databases' IDs go through a slower index, which can take most of a minute when Ensembl is busy.
- Species (`species`, text): Which genome to read. Human on GRCh38, the current build, is the default. Human on GRCh37 (hg19) is listed beside it, for positions and variants written against the older build. Any other species Ensembl covers can be picked or typed, by scientific name (mus_musculus), common name (mouse) or taxonomy number (10090). Default: `homo_sapiens`.
- Only these databases (`databases`, list): Keep the list of references to these. Leave empty for all of them. The IDs given on their own are always filled in. One or more of: `hgnc` (HGNC (human gene names)), `ncbi_gene` (NCBI Gene), `uniprot` (UniProt (reviewed)), `uniprot_unreviewed` (UniProt (unreviewed)), `refseq_mrna` (RefSeq transcripts), `refseq_protein` (RefSeq proteins), `omim_gene` (OMIM gene entry), `omim_disease` (OMIM diseases), `reactome` (Reactome pathways), `go` (Gene Ontology terms), and 11 more.

**Outputs**

- `count` (number): References listed
- `gene_id` (text): Ensembl gene ID
- `gene_symbol` (text): Symbol
- `hgnc_id` (text): HGNC ID, such as HGNC:1101
- `matched_by` (text): How it was recognised: ensembl_id, symbol, stable_id (the species' own kind of ID) or other_name (an alias, a former symbol or another database's ID)
- `matched_by_label` (text): That reading in words, for showing to somebody
- `ncbi_gene_id` (text): NCBI Gene (Entrez) ID
- `omim_gene_id` (text): OMIM gene entry
- `query` (text): What was asked for, as given
- `references` (object): Every reference, grouped by database: hgnc, ncbi_gene, uniprot, refseq_mrna, omim_disease, reactome, go, pdb and more. Each entry has id, name and description.
- `refseq_proteins` (list): RefSeq proteins, such as NP_000050.3
- `refseq_transcripts` (list): RefSeq transcripts, such as NM_000059.4
- `synonyms` (list): Former symbols and aliases
- `uniprot_ids` (list): Reviewed UniProt accessions

**Example output**

```json
{
  "count": 2,
  "gene_id": "ENSG00000139618",
  "gene_symbol": "BRCA2",
  "hgnc_id": "HGNC:1101",
  "matched_by": "symbol",
  "matched_by_label": "Gene symbol",
  "ncbi_gene_id": "675",
  "omim_gene_id": "600185",
  "query": "BRCA2",
  "references": {
    "hgnc": [
      {
        "description": "BRCA2 DNA repair associated",
        "id": "HGNC:1101",
        "name": "BRCA2"
      }
    ],
    "omim_disease": [
      {
        "description": "BREAST CANCER;;BREAST CANCER, FAMILIAL BREAST CANCER, FAMILIAL MALE, INCLUDED",
        "id": "114480",
        "name": "BREAST CANCER [#114480]"
      }
    ]
  },
  "refseq_proteins": [
    "NP_000050.3",
    "NP_001393648.1"
  ],
  "refseq_transcripts": [
    "NM_000059.4",
    "NM_001406719.1"
  ],
  "synonyms": [
    "BRCC2",
    "FACD",
    "FAD",
    "FAD1",
    "FANCD",
    "FANCD1",
    "XRCC11"
  ],
  "uniprot_ids": [
    "P51587"
  ]
}
```

### Get a gene, transcript or protein sequence

Get the sequence of a gene, a transcript or a protein. Choose the protein's amino acids, the coding sequence from start codon to stop, the full spliced transcript, or the genomic DNA with its introns and, if asked, a stretch either side for the promoter. A gene gives its main isoform unless every isoform is asked for. Comes back as text and as FASTA ready to paste into an alignment or primer design tool, or as a FASTA file.

**Inputs**

- Gene, transcript or protein (`feature`, text, required): What to read. A gene by symbol or ID gives its main transcript's sequence; a transcript or protein ID (ENST00000380152, ENSP00000369497) gives exactly that one. Versions are fine.
- Species (`species`, text): Which genome to read. Human on GRCh38, the current build, is the default. Human on GRCh37 (hg19) is listed beside it, for positions and variants written against the older build. Any other species Ensembl covers can be picked or typed, by scientific name (mus_musculus), common name (mouse) or taxonomy number (10090). Default: `homo_sapiens`.
- Sequence (`sequence_type`, text): Which sequence. Protein is the amino acids. Coding is the DNA from start codon to stop, what gets cloned. Transcript adds the untranslated ends. Genomic is the stretch of chromosome the gene covers, introns and all. One of: `protein` (Protein (amino acids)), `cds` (Coding sequence (start to stop codon)), `cdna` (Transcript (spliced, with untranslated ends)), `genomic` (Genomic DNA (introns included)). Default: `protein`.
- Every isoform (`all_isoforms`, true/false): Return the sequence of every transcript of the gene rather than only its main one. Has no effect when a transcript or protein is named. Default: `false`.
- Bases before (`upstream`, number): For the genomic sequence only: how many bases before the gene to include, which is where its promoter is. Up to 100,000. From 0 to 100000. Default: `0`.
- Bases after (`downstream`, number): For the genomic sequence only: how many bases after the gene to include. Up to 100,000. From 0 to 100000. Default: `0`.
- Return as (`output`, text): Text puts the sequence in the step's result, ready to drop into an email or a later step. A FASTA file saves it to your documents instead and returns a link, which is the way to take anything over a million letters, and what alignment and primer design tools want as input. One of: `text` (Text in the result), `file` (A FASTA file). Default: `text`.

**Outputs**

- `content_type` (text): Its type
- `count` (number): How many sequences
- `document_ref` (text): Reference to the saved FASTA file, when a file was asked for
- `documents` (list): Every file saved, which is one
- `download_url` (text): A link that serves it
- `fasta` (text): Every sequence in FASTA, ready to paste
- `filename` (text): The file's name
- `gene_id` (text): The gene, when one was named
- `gene_symbol` (text): Its symbol
- `id` (text): The transcript or protein the first sequence is
- `length` (number): Its length
- `matched_by` (text): How it was recognised: ensembl_id, symbol, stable_id (the species' own kind of ID) or other_name (an alias, a former symbol or another database's ID)
- `matched_by_label` (text): That reading in words, for showing to somebody
- `query` (text): What was asked for, as given
- `sequence` (text): The first sequence, as text
- `sequence_type` (text): protein, cds, cdna or genomic
- `sequence_type_label` (text): That sequence in words
- `sequences` (list): Every sequence, one per isoform
- `size_bytes` (number): How big it is
- `total_length` (number): Letters across every sequence

**Example output**

```json
{
  "count": 1,
  "fasta": ">ENSP00000369497 BRCA2 protein\nMPIGSKERPTFFEIFKTRCNKADLGPISLNWFEELSSEAPPYNSEPAEESEHKNNNYEPN\n",
  "gene_id": "ENSG00000139618",
  "gene_symbol": "BRCA2",
  "id": "ENSP00000369497",
  "length": 3418,
  "matched_by": "symbol",
  "matched_by_label": "Gene symbol",
  "query": "BRCA2",
  "sequence": "MPIGSKERPTFFEIFKTRCNKADLGPISLNWFEELSSEAPPYNSEPAEESEHKNNNYEPN",
  "sequence_type": "protein",
  "sequence_type_label": "Protein (amino acids)",
  "sequences": [
    {
      "id": "ENSP00000369497",
      "length": 3418,
      "molecule": "protein",
      "sequence": "MPIGSKERPTFFEIFKTRCNKADLGPISLNWFEELSSEAPPYNSEPAEESEHKNNNYEPN",
      "version": 3
    }
  ],
  "total_length": 3418
}
```

### Get a variant

Read everything Ensembl holds on one known variant: where it is, its alleles and which is ancestral, what it does, how common it is in each population of gnomAD and 1000 Genomes, ClinVar's verdict, and the diseases and traits studies have tied it to, curated sources first and then GWAS hits by strength. Give an rsID, or the variant in any notation and it is looked up under the rsID it is catalogued as.

**Inputs**

- Variant (`variant`, text, required): The variant: an rsID (rs7412), or HGVS, SPDI or chromosome, position and alleles, which is looked up under the rsID it is catalogued as.
- Species (`species`, text): Which genome to read. Human on GRCh38, the current build, is the default. Human on GRCh37 (hg19) is listed beside it, for positions and variants written against the older build. Any other species Ensembl covers can be picked or typed, by scientific name (mus_musculus), common name (mouse) or taxonomy number (10090). Default: `homo_sapiens`.
- Include (`include`, list): What to add to the variant's own details. A well studied variant has hundreds of trait links and dozens of population frequencies. One or more of: `frequencies` (How common it is, by population), `phenotypes` (Traits and diseases linked to it). Default: `["frequencies", "phenotypes"]`.
- Every population (`all_populations`, true/false): Frequencies for every cohort Ensembl holds, rather than only gnomAD and the 1000 Genomes continental groups. The rest are dozens of smaller studies. Default: `false`.
- How many traits (`phenotype_limit`, number): How many linked traits to return, curated diseases first and then GWAS results from the strongest down. From 1 to 1000. Default: `25`.

**Outputs**

- `allele_string` (text): Alleles, reference first
- `alternate_alleles` (list): Alternate alleles
- `ancestral_allele` (text): The allele shared with other primates
- `assembly` (text): Genome build
- `chromosome` (text): Chromosome or scaffold name
- `clinical_significance` (list): ClinVar's verdicts
- `consequence_label` (text): That in words
- `end` (number): Last base, included
- `evidence` (list): What supports it being real: Frequency, Cited...
- `frequencies` (list): Allele frequencies, one row per population and allele
- `id` (text): The variant's ID
- `impact` (text): VEP's severity
- `location` (text): The same place written as chromosome:start-end
- `minor_allele` (text): The rarer allele
- `minor_allele_frequency` (number): How common the rarer allele is
- `minor_allele_frequency_source` (text): Which population that is from
- `most_severe_consequence` (text): Its worst effect on any transcript
- `other_locations` (list): Other placements, on patches or alternate haplotypes
- `phenotype_count` (number): How many trait links there are in all
- `phenotypes` (list): Linked diseases and traits, curated first
- `query` (text): What was asked for
- `reference_allele` (text): Reference allele
- `source` (text): Where it was catalogued
- `start` (number): First base, counting from 1
- `strand` (number): 1 for the forward strand, -1 for the reverse
- `synonyms` (list): Its IDs elsewhere: ClinVar, UniProt, PharmGKB
- `url` (text): The variant's page on Ensembl
- `variant_class` (text): SNP, indel...

**Example output**

```json
{
  "allele_string": "C/T",
  "alternate_alleles": [
    "T"
  ],
  "ancestral_allele": "C",
  "assembly": "GRCh38",
  "chromosome": "19",
  "clinical_significance": [
    "benign",
    "likely benign",
    "pathogenic",
    "drug response",
    "other",
    "risk factor"
  ],
  "consequence_label": "Changes one amino acid",
  "end": 44908822,
  "evidence": [
    "Frequency",
    "1000Genomes",
    "Cited",
    "gnomAD"
  ],
  "frequencies": [
    {
      "allele": "T",
      "allele_count": 11840,
      "frequency": 0.07784,
      "group": "ALL",
      "population": "gnomADg:ALL",
      "project": "gnomAD genomes"
    }
  ],
  "id": "rs7412",
  "impact": "MODERATE",
  "location": "19:44908822",
  "minor_allele": "T",
  "minor_allele_frequency": 0.0750798722044728,
  "minor_allele_frequency_source": "1000 Genomes",
  "most_severe_consequence": "missense_variant",
  "other_locations": [],
  "phenotype_count": 814,
  "phenotypes": [
    {
      "effect": null,
      "genes": [
        "APOE"
      ],
      "ontology_accessions": [
        "MONDO:0018473",
        "Orphanet:412"
      ],
      "p_value": null,
      "risk_allele": "T",
      "source": "ClinVar",
      "study": null,
      "trait": "Familial type 3 hyperlipoproteinemia"
    }
  ],
  "query": "rs7412",
  "reference_allele": "C",
  "source": "Variants (including SNPs and indels) imported from dbSNP",
  "start": 44908822,
  "strand": 1,
  "synonyms": [
    "VAR_000664",
    "PA166155341",
    "VCV000017848"
  ],
  "url": "https://www.ensembl.org/Homo_sapiens/Variation/Explore?v=rs7412",
  "variant_class": "SNP"
}
```

### Get the DNA of a region

Read the DNA of any stretch of a genome by its coordinates: the bases around a variant for a probe or a primer, a promoter upstream of a gene, a whole locus. Up to fifty regions at once, each up to ten million bases, written the way Ensembl or a genome browser writes them. Read either strand, and mark repeats in lower case or as N, which is what primer design tools expect. Comes back as text and FASTA, or as a FASTA file.

**Inputs**

- Regions (`regions`, list, required): The stretches to read, as chromosome:start-end, counting from 1 with both ends included. 7:140753286-140753386, chr7:140,753,286-140,753,386 and 7:140753286..140753386 all work, and :-1 at the end reads that one region's reverse strand.
- Species (`species`, text): Which genome to read. Human on GRCh38, the current build, is the default. Human on GRCh37 (hg19) is listed beside it, for positions and variants written against the older build. Any other species Ensembl covers can be picked or typed, by scientific name (mus_musculus), common name (mouse) or taxonomy number (10090). Default: `homo_sapiens`.
- Strand (`strand`, text): Which strand to read. Forward is the chromosome as written; reverse is its reverse complement, which is how a gene on the minus strand reads. A region ending in :1 or :-1 keeps its own. One of: `forward` (Forward strand, as the chromosome is written), `reverse` (Reverse strand (reverse complement)). Default: `forward`.
- Mask repeats (`mask`, text): Mark repetitive sequence, which primers and probes should avoid. Lower case keeps the bases readable; N hides them. One of: `none` (No masking), `soft` (Repeats in lower case), `hard` (Repeats as N). Default: `none`.
- Return as (`output`, text): Text puts the sequence in the step's result, ready to drop into an email or a later step. A FASTA file saves it to your documents instead and returns a link, which is the way to take anything over a million letters, and what alignment and primer design tools want as input. One of: `text` (Text in the result), `file` (A FASTA file). Default: `text`.

**Outputs**

- `content_type` (text): Its type
- `count` (number): How many regions came back
- `document_ref` (text): Reference to the saved FASTA file, when a file was asked for
- `documents` (list): Every file saved, which is one
- `download_url` (text): A link that serves it
- `fasta` (text): Every region in FASTA, ready to paste
- `filename` (text): The file's name
- `not_found` (list): Regions Ensembl had no sequence for
- `requested` (number): How many were asked for
- `sequence` (text): The first region's DNA, as text
- `sequences` (list): One per region, in the order given
- `size_bytes` (number): How big it is
- `total_length` (number): Bases across every region

**Example output**

```json
{
  "count": 1,
  "fasta": ">X:1000000-1000060:1 GRCh38\nCTGTAGAAACATTAGCCTGGCTAACAAGGTGAAACCCCATCTCTACTAACAATACAAAAT\nA\n",
  "not_found": [],
  "requested": 1,
  "sequence": "CTGTAGAAACATTAGCCTGGCTAACAAGGTGAAACCCCATCTCTACTAACAATACAAAATA",
  "sequences": [
    {
      "assembly": "GRCh38",
      "chromosome": "X",
      "end": 1000060,
      "length": 61,
      "query": "chrX:1,000,000-1,000,060",
      "region": "X:1000000-1000060",
      "sequence": "CTGTAGAAACATTAGCCTGGCTAACAAGGTGAAACCCCATCTCTACTAACAATACAAAATA",
      "start": 1000000,
      "strand": 1,
      "url": "https://www.ensembl.org/Homo_sapiens/Location/View?r=X:1000000-1000060"
    }
  ],
  "total_length": 61
}
```

### List a gene's diseases and traits

List the diseases and traits a gene is linked to, and who says so: OMIM, Orphanet, GenCC and the Gene2Phenotype panels for inherited disease, each with the ontology terms that tie the disease name to other databases. Turn on tumour types to add the cancers the Cancer Gene Census finds it mutated in. Curated disease sources come first.

**Inputs**

- Gene (`gene`, text, required): The gene to read. Give whatever you have: a symbol (BRCA2), an Ensembl ID with or without its version (ENSG00000139618.19), a transcript or protein ID, which is read as the gene it belongs to, a former name or alias (HER2), or another database's ID for it, such as UniProt (P51587). The answer says which reading found it. Aliases and other databases' IDs go through a slower index, which can take most of a minute when Ensembl is busy.
- Species (`species`, text): Which genome to read. Human on GRCh38, the current build, is the default. Human on GRCh37 (hg19) is listed beside it, for positions and variants written against the older build. Any other species Ensembl covers can be picked or typed, by scientific name (mus_musculus), common name (mouse) or taxonomy number (10090). Default: `homo_sapiens`.
- Include tumour types (`include_tumour_types`, true/false): Add the tumour types the Cancer Gene Census has found the gene mutated in. For a known cancer gene that is well over a hundred, so it is off by default. Default: `false`.

**Outputs**

- `count` (number): How many links
- `gene_id` (text): The gene
- `gene_symbol` (text): Its symbol
- `matched_by` (text): How it was recognised: ensembl_id, symbol, stable_id (the species' own kind of ID) or other_name (an alias, a former symbol or another database's ID)
- `matched_by_label` (text): That reading in words, for showing to somebody
- `phenotypes` (list): Curated diseases first
- `query` (text): What was asked for, as given
- `sources` (object): How many links each source gives

**Example output**

```json
{
  "count": 26,
  "gene_id": "ENSG00000139618",
  "gene_symbol": "BRCA2",
  "matched_by": "symbol",
  "matched_by_label": "Gene symbol",
  "phenotypes": [
    {
      "is_tumour_type": false,
      "ontology_accessions": [
        "EFO:0000305",
        "HP:0003002",
        "MONDO:0007254",
        "Orphanet:227535"
      ],
      "source": "MIM morbid",
      "source_id": "114480",
      "trait": "Breast Cancer"
    },
    {
      "is_tumour_type": false,
      "ontology_accessions": [
        "MONDO:0015278",
        "Orphanet:1333"
      ],
      "source": "Orphanet",
      "source_id": "1333",
      "trait": "Familial pancreatic carcinoma"
    }
  ],
  "query": "BRCA2",
  "sources": {
    "G2P": 2,
    "GenCC": 5,
    "MIM morbid": 8,
    "Orphanet": 11
  }
}
```

### List a protein's domains and features

Map what is along a protein: its domains from Pfam, SMART, PROSITE, CDD and the other InterPro member databases with where each starts and ends, grouped by InterPro entry, and its coiled coils, disordered stretches, signal peptide and membrane helices. Turn on structures to add the solved PDB structures covering it. This is the map for reading whether a variant lands inside a functional domain.

**Inputs**

- Protein, transcript or gene (`protein`, text, required): The protein: an Ensembl protein ID, a transcript ID for the protein it makes, or a gene, read as the protein of its main transcript.
- Species (`species`, text): Which genome to read. Human on GRCh38, the current build, is the default. Human on GRCh37 (hg19) is listed beside it, for positions and variants written against the older build. Any other species Ensembl covers can be picked or typed, by scientific name (mus_musculus), common name (mouse) or taxonomy number (10090). Default: `homo_sapiens`.
- Include structures (`include_structures`, true/false): Add every solved PDB structure chain covering the protein, with the stretch it covers. A well studied protein has dozens. Default: `false`.

**Outputs**

- `count` (number): Features listed
- `domains` (list): Domain hits, in order along the protein
- `gene_id` (text): Its gene, when one was named
- `gene_symbol` (text): Its symbol
- `interpro_domains` (list): The same hits grouped by InterPro entry
- `matched_by` (text): How it was recognised: ensembl_id, symbol, stable_id (the species' own kind of ID) or other_name (an alias, a former symbol or another database's ID)
- `matched_by_label` (text): That reading in words, for showing to somebody
- `protein_id` (text): The protein read
- `query` (text): What was asked for, as given
- `regions` (list): Coiled coils, disorder, signal peptides, membrane helices
- `structure_count` (number): Structures there are, whether listed or not
- `structures` (list): Solved structures, when asked for
- `url` (text): The protein's page on Ensembl

**Example output**

```json
{
  "count": 49,
  "domains": [
    {
      "accession": "PIRSF002397",
      "database": "PIRSF",
      "end": 3418,
      "interpro_id": "IPR015525",
      "length": 3418,
      "name": "Breast cancer type 2 susceptibility protein",
      "start": 1
    },
    {
      "accession": "PF00634",
      "database": "Pfam",
      "end": 1033,
      "interpro_id": "IPR002093",
      "length": 29,
      "name": "BRCA2 repeat",
      "start": 1005
    }
  ],
  "gene_id": "ENSG00000139618",
  "gene_symbol": "BRCA2",
  "interpro_domains": [
    {
      "databases": [
        "PIRSF",
        "PANTHER"
      ],
      "interpro_id": "IPR015525",
      "name": "Breast cancer type 2 susceptibility protein",
      "occurrences": 2
    }
  ],
  "matched_by": "symbol",
  "matched_by_label": "Gene symbol",
  "protein_id": "ENSP00000369497",
  "query": "BRCA2",
  "regions": [
    {
      "end": 68,
      "source": "MobiDBLite",
      "start": 37,
      "type": "Disordered"
    }
  ],
  "structure_count": 52,
  "structures": [],
  "url": "https://www.ensembl.org/id/ENSP00000369497"
}
```

### List what is in a region

List what sits in a stretch of genome: the genes and their transcripts, the known variants with what they do and what ClinVar says, structural variants, regulatory features and the chromosome band. Give a region, or a gene to list what lies in and around it. This answers what else is near a GWAS hit, which genes a deletion takes out, and which ClinVar variants fall in an exon. Each kind comes back in its own list, with a count.

**Inputs**

- Region or gene (`region`, text, required): A region as chromosome:start-end (7:140719327-140924929 or chr7:140,719,327-140,924,929), up to five million bases, or a gene, which lists what lies within it.
- Species (`species`, text): Which genome to read. Human on GRCh38, the current build, is the default. Human on GRCh37 (hg19) is listed beside it, for positions and variants written against the older build. Any other species Ensembl covers can be picked or typed, by scientific name (mus_musculus), common name (mouse) or taxonomy number (10090). Default: `homo_sapiens`.
- List (`features`, list): What to list. Known variants are dense, roughly one every three bases in human, so they are listed for up to ten thousand bases at once, or half a million with ClinVar variants only. One or more of: `genes`, `transcripts`, `variants` (Known variants), `structural_variants` (Structural variants), `regulatory_features` (Regulatory features), `bands` (Chromosome bands). Default: `["genes"]`.
- ClinVar variants only (`clinvar_only`, true/false): Keep only variants with a ClinVar record, which are the ones with a clinical verdict. Widens the region variants can be listed for. Default: `false`.
- Protein coding genes only (`protein_coding_only`, true/false): Leave out pseudogenes, long non coding RNAs and other genes that make no protein. Default: `false`.
- Widen by (`flank`, number): Bases to add at each end, to see what is near a gene or a position rather than only on it. Up to 2,500,000. From 0 to 2500000. Default: `0`.
- How many to return (`limit`, number): The most of each kind to list. The counts are always in full. From 1 to 5000. Default: `500`.

**Outputs**

- `bands` (list): Chromosome bands, as seen under a microscope
- `chromosome` (text): Chromosome
- `count` (number): Features found in all
- `counts` (object): How many of each kind, in full
- `end` (number): Last base
- `gene_id` (text): The gene, if one was named
- `gene_symbol` (text): Its symbol
- `genes` (list): Genes
- `length` (number): Bases searched
- `query` (text): As given
- `region` (text): The region searched
- `regulatory_features` (list): Promoters, enhancers and other regulatory features
- `start` (number): First base
- `structural_variants` (list): Structural variants, which can span far past the region
- `transcripts` (list): Transcripts
- `truncated` (true/false): True when a list was cut at the limit
- `url` (text): The region in Ensembl's browser
- `variants` (list): Known variants

**Example output**

```json
{
  "bands": [
    {
      "band": "q34",
      "chromosome": "7",
      "end": 143400000,
      "location": "7:138500001-143400000",
      "name": "7q34",
      "stain": "gneg",
      "start": 138500001,
      "strand": 0
    }
  ],
  "chromosome": "7",
  "count": 3,
  "counts": {
    "bands": 1,
    "genes": 2
  },
  "end": 140924929,
  "gene_id": null,
  "gene_symbol": null,
  "genes": [
    {
      "biotype": "protein_coding",
      "canonical_transcript": "ENST00000646891",
      "chromosome": "7",
      "description": "B-Raf proto-oncogene, serine/threonine kinase",
      "description_source_id": "HGNC:1097",
      "end": 140925199,
      "id": "ENSG00000157764",
      "location": "7:140719327-140925199",
      "start": 140719327,
      "strand": -1,
      "symbol": "BRAF",
      "url": "https://www.ensembl.org/id/ENSG00000157764"
    },
    {
      "biotype": "protein_coding",
      "canonical_transcript": "ENST00000247866",
      "chromosome": "7",
      "description": "NADH:ubiquinone oxidoreductase subunit B2",
      "description_source_id": "HGNC:7697",
      "end": 140723923,
      "id": "ENSG00000090266",
      "location": "7:140690777-140723923",
      "start": 140690777,
      "strand": 1,
      "symbol": "NDUFB2",
      "url": "https://www.ensembl.org/id/ENSG00000090266"
    }
  ],
  "length": 205603,
  "query": "7:140719327-140924929",
  "region": "7:140719327-140924929",
  "regulatory_features": [],
  "start": 140719327,
  "structural_variants": [],
  "transcripts": [],
  "truncated": false,
  "url": "https://www.ensembl.org/Homo_sapiens/Location/View?r=7:140719327-140924929",
  "variants": []
}
```

### Look up a list of genes

Build one table of genes from a whole column of them. Hand it the symbols or IDs out of a spreadsheet, an RNA-seq result or an earlier step, up to a thousand at a time and mixed freely, and get a row per gene with its Ensembl ID, symbol, full name, biotype and position. Versioned IDs from GENCODE and TCGA files work as they are. Anything Ensembl cannot place comes back in its own list with the reason, rather than being quietly dropped, so a run over real data says exactly which rows need a human.

**Inputs**

- Genes (`genes`, list, required): The genes to look up, up to a thousand. Each can be a symbol, an Ensembl gene, transcript or protein ID with or without its version, a former name, or another database's ID, and they can be mixed.
- Species (`species`, text): Which genome to read. Human on GRCh38, the current build, is the default. Human on GRCh37 (hg19) is listed beside it, for positions and variants written against the older build. Any other species Ensembl covers can be picked or typed, by scientific name (mus_musculus), common name (mouse) or taxonomy number (10090). Default: `homo_sapiens`.

**Outputs**

- `count` (number): How many were found
- `genes` (list): A row per gene found, in the order given
- `not_found` (list): The values Ensembl could not place
- `requested` (number): How many were asked for

**Example output**

```json
{
  "count": 2,
  "genes": [
    {
      "assembly": "GRCh38",
      "biotype": "protein_coding",
      "canonical_transcript": "ENST00000380152",
      "canonical_transcript_version": 8,
      "chromosome": "13",
      "description": "BRCA2 DNA repair associated",
      "description_source": "HGNC Symbol",
      "description_source_id": "HGNC:1101",
      "end": 32400268,
      "id": "ENSG00000139618",
      "length": 85183,
      "location": "13:32315086-32400268",
      "matched_by": "symbol",
      "query": "BRCA2",
      "species": "homo_sapiens",
      "start": 32315086,
      "strand": 1,
      "symbol": "BRCA2",
      "url": "https://www.ensembl.org/id/ENSG00000139618",
      "version": 19
    },
    {
      "assembly": "GRCh38",
      "biotype": "protein_coding",
      "canonical_transcript": "ENST00000269305",
      "canonical_transcript_version": 9,
      "chromosome": "17",
      "description": "tumor protein p53",
      "description_source": "HGNC Symbol",
      "description_source_id": "HGNC:11998",
      "end": 7687546,
      "id": "ENSG00000141510",
      "length": 25768,
      "location": "17:7661779-7687546",
      "matched_by": "ensembl_id",
      "query": "ENSG00000141510.18",
      "species": "homo_sapiens",
      "start": 7661779,
      "strand": -1,
      "symbol": "TP53",
      "url": "https://www.ensembl.org/id/ENSG00000141510",
      "version": 21
    }
  ],
  "not_found": [
    {
      "query": "NOTAGENE1",
      "reason": "Ensembl has no homo_sapiens gene called 'NOTAGENE1', under its symbol, a former name or another database's ID."
    }
  ],
  "requested": 3
}
```

### Predict variant effects

Read what a list of DNA variants does, with the Variant Effect Predictor that clinical and research labs run their sequencing results through. Give up to two hundred, as rsIDs, HGVS, SPDI or chromosome, position and alleles the way a VCF writes them, mixed freely. Each comes back with the gene it hits, what it does to the protein in words and as HGVS, how severe that is, SIFT, PolyPhen and AlphaMissense predictions, how common it is in gnomAD and 1000 Genomes, and what ClinVar says about it. The summary is read on the MANE Select transcript, the one clinical reports use. Anything it cannot read comes back in its own list with the reason, such as a reference base that shows the variant is from the other build.

**Inputs**

- Variants (`variants`, list, required): The variants, up to two hundred, in any mix of: rsIDs (rs699); HGVS on a transcript, protein, gene or chromosome (ENST00000366667:c.803C>T, BRAF:p.Val600Glu, 7:g.140753336A>T); SPDI (NC_000001.11:230710020:G:A); or chromosome, position and alleles counted from 1 as a VCF writes them (1-230710021-G-A, chr1:230710021:G:A).
- Species (`species`, text): Which genome to read. Human on GRCh38, the current build, is the default. Human on GRCh37 (hg19) is listed beside it, for positions and variants written against the older build. Any other species Ensembl covers can be picked or typed, by scientific name (mus_musculus), common name (mouse) or taxonomy number (10090). Default: `homo_sapiens`.
- Extra scores (`scores`, list): Predictions to add beyond SIFT and PolyPhen, for human only. AlphaMissense and LOFTEE are free to use for anything. CADD, SpliceAI and REVEL are licensed for non-commercial use only, so check with their makers before relying on them commercially. One or more of: `alphamissense` (AlphaMissense (missense pathogenicity)), `cadd` (CADD (how damaging, any variant)), `spliceai` (SpliceAI (effect on splicing)), `revel` (REVEL (missense pathogenicity)), `loftee` (LOFTEE (whether a loss of function is real)). Default: `["alphamissense"]`.
- Every transcript (`include_all_transcripts`, true/false): List the effect on every transcript the variant touches, not only the summary. A variant in a busy gene can touch dozens, most of them minor isoforms. Default: `false`.

**Outputs**

- `count` (number): How many were annotated
- `not_annotated` (list): The variants that could not be read, with why
- `requested` (number): How many were given
- `variants` (list): One row per variant annotated, in the order given

**Example output**

```json
{
  "count": 1,
  "not_annotated": [
    {
      "input": "1-230710048-G-A",
      "reason": "The genome has A at 1:230,710,048, not G. This was read on GRCh38, the current build. A variant written against GRCh37 (hg19) looks exactly like this: if that is where it came from, choose human on GRCh37 as the species."
    }
  ],
  "requested": 2,
  "variants": [
    {
      "allele_frequency": 0.5782,
      "allele_frequency_source": "gnomAD genomes",
      "allele_string": "A/G",
      "alleles": [],
      "alphamissense_class": "likely benign",
      "alphamissense_score": 0.0541,
      "alternate_alleles": [
        "G"
      ],
      "amino_acids": "M/T",
      "assembly": "GRCh38",
      "biotype": "protein_coding",
      "cadd_phred": null,
      "cadd_raw": null,
      "chromosome": "1",
      "clinical_significance": [
        "benign"
      ],
      "clinvar_ids": [
        "RCV000019693",
        "RCV000019692"
      ],
      "codons": "aTg/aCg",
      "consequence": "missense_variant",
      "consequence_label": "Changes one amino acid",
      "consequences": [
        "missense_variant"
      ],
      "distance": null,
      "end": 230710048,
      "exon": "2/5",
      "frequencies": {
        "gnomad_exomes": 0.458,
        "gnomad_genomes": 0.5782,
        "gnomad_genomes_afr": 0.8304,
        "gnomad_genomes_nfe": 0.4207,
        "thousand_genomes": 0.7051
      },
      "gene_id": "ENSG00000135744",
      "gene_symbol": "AGT",
      "hgvsc": "ENST00000366667.6:c.776T>C",
      "hgvsp": "ENSP00000355627.5:p.Met259Thr",
      "impact": "MODERATE",
      "input": "rs699",
      "intron": null,
      "is_canonical": true,
      "is_mane_select": true,
      "known_variants": [
        "CM920010",
        "COSV64184214",
        "rs699"
      ],
      "location": "1:230710048",
      "loftee": null,
      "loftee_filter": null,
      "mane_select_refseq": "NM_001384479.1",
      "most_severe_consequence": "missense_variant",
      "notation": "id",
      "other_locations": [],
      "polyphen_prediction": "benign",
      "polyphen_score": 0,
      "protein_change": "Met259Thr",
      "protein_id": "ENSP00000355627",
      "protein_position": 259,
      "pubmed_count": 115,
      "pubmed_ids": [
        25741868,
        21467728,
        1394429
      ],
      "reference_allele": "A",
      "revel_score": null,
      "rsid": "rs699",
      "sift_prediction": "tolerated",
      "sift_score": 1,
      "spliceai_max_score": null,
      "start": 230710048,
      "transcript_id": "ENST00000366667",
      "transcripts": [],
      "url": "https://www.ensembl.org/Homo_sapiens/Variation/Explore?v=rs699",
      "variant_allele": "G",
      "variant_class": "SNV",
      "vcf": [
        "1-230710048-A-G"
      ]
    }
  ]
}
```

### Translate a variant between notations

Write each variant every way it is written elsewhere, so records from different sources can be matched up: its rsID, genomic HGVS, SPDI, VCF style, and HGVS on every transcript and protein, Ensembl's and RefSeq's side by side. Give up to two hundred as rsIDs, HGVS, SPDI or chromosome, position and alleles, mixed freely. A variant with two alternate alleles comes back as two rows, one per allele.

**Inputs**

- Variants (`variants`, list, required): The variants, up to two hundred: rsIDs, HGVS (NM_000059.4:c.68-7T>A), SPDI (NC_000001.11:230710020:G:A) or chromosome, position and alleles counted from 1 as a VCF writes them (1-230710021-G-A).
- Species (`species`, text): Which genome to read. Human on GRCh38, the current build, is the default. Human on GRCh37 (hg19) is listed beside it, for positions and variants written against the older build. Any other species Ensembl covers can be picked or typed, by scientific name (mus_musculus), common name (mouse) or taxonomy number (10090). Default: `homo_sapiens`.

**Outputs**

- `count` (number): Rows returned, one per allele
- `not_found` (list): Variants that could not be translated, with why
- `requested` (number): Variants given
- `variants` (list): One row per variant and allele

**Example output**

```json
{
  "count": 1,
  "not_found": [],
  "requested": 1,
  "variants": [
    {
      "allele": "G",
      "hgvs_coding": [
        "ENST00000366667.6:c.776T>C"
      ],
      "hgvs_coding_refseq": [
        "NM_001382817.3:c.776T>C",
        "NM_001384479.1:c.776T>C"
      ],
      "hgvs_genomic": "NC_000001.11:g.230710048A>G",
      "hgvs_genomic_other": [],
      "hgvs_protein": [
        "ENSP00000355627.5:p.Met259Thr"
      ],
      "hgvs_protein_refseq": [
        "NP_001369746.2:p.Met259Thr",
        "NP_001371408.1:p.Met259Thr"
      ],
      "ids": [
        "rs699",
        "COSV64184214",
        "CM920010"
      ],
      "input": "rs699",
      "rsid": "rs699",
      "spdi": "NC_000001.11:230710047:A:G",
      "vcf": "1-230710048-A-G"
    }
  ]
}
```
