# mapIds

**Identifier:** `uniprot_mapIds`

**Provider:** [UniProt](https://kirha.com/providers/uniprot.md)

Convert biological identifiers through UniProt: gene symbol <-> UniProt accession <-> Ensembl gene/transcript/protein, NCBI Gene, HGNC, ChEMBL target, DrugBank, PDB, OMIM, RefSeq protein. Mappings between two non-UniProt namespaces (e.g. geneSymbol -> ensemblGene) go through UniProt accessions. Ensembl gene IDs are Open Targets target IDs; ChEMBL target IDs chain into ChEMBL; DrugBank -> uniprot lists a drug's protein targets.

## Run it with the CLI

```bash
kirha tools run uniprot_mapIds \
  --input '{
    "ids": [
      "<ids>"
    ],
    "from": "uniprot",
    "to": "uniprot"
  }'
```

`--input` takes a JSON object that matches the input schema. Pass `--input -` to read it from stdin.

## Call it over HTTP

```bash
curl https://api.kirha.com/tools/v1/execute \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: **********' \
  --data '{
  "tool_name": "uniprot_mapIds",
  "input": {
    "ids": [
      "<ids>"
    ],
    "from": "uniprot",
    "to": "uniprot"
  }
}'
```

Replace the stars with an API key from https://app.kirha.com/api-keys.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "from": {
      "enum": [
        "uniprot",
        "geneSymbol",
        "ensemblGene",
        "ensemblTranscript",
        "ensemblProtein",
        "ncbiGene",
        "hgnc",
        "chemblTarget",
        "drugbank",
        "pdb",
        "omim",
        "refseqProtein"
      ],
      "type": "string"
    },
    "ids": {
      "items": {
        "minLength": 1,
        "type": "string"
      },
      "maxItems": 25,
      "minItems": 1,
      "type": "array"
    },
    "reviewedOnly": {
      "default": true,
      "description": "Restrict UniProt hits to Swiss-Prot entries",
      "type": "boolean"
    },
    "taxonId": {
      "default": "9606",
      "description": "NCBI taxon ID, only used to disambiguate gene symbols",
      "pattern": "^\\d+$",
      "type": "string"
    },
    "to": {
      "enum": [
        "uniprot",
        "geneSymbol",
        "ensemblGene",
        "ensemblTranscript",
        "ensemblProtein",
        "ncbiGene",
        "hgnc",
        "chemblTarget",
        "drugbank",
        "pdb",
        "omim",
        "refseqProtein"
      ],
      "type": "string"
    }
  },
  "required": [
    "ids",
    "from",
    "to"
  ],
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "context": {
      "type": "string"
    },
    "mappings": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "from": {
            "type": "string"
          },
          "to": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "from",
          "to"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "toIds": {
      "description": "All unique target IDs, for composition with other tools",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "unmappedIds": {
      "items": {
        "type": "string"
      },
      "type": "array"
    }
  },
  "required": [
    "context",
    "mappings",
    "toIds"
  ],
  "type": "object"
}
```

## Related tools

Other UniProt tools that this tool refers to, or that refer to it.

- [`getProteinEntry`](https://kirha.com/providers/uniprot/getProteinEntry.md)
- [`searchProteins`](https://kirha.com/providers/uniprot/searchProteins.md)

-----

[All UniProt tools](https://kirha.com/providers/uniprot.md) · [< Back to tools list](https://kirha.com/tools.md)