acidgenomes.make_protein_to_gene_from_ensembl

acidgenomes.make_protein_to_gene_from_ensembl(protein_ids: list[str], *, batch_size: int = 1000) ProteinToGene

Map Ensembl protein IDs (ENSP) to gene IDs and gene names.

Uses the Ensembl REST API /lookup/id endpoint with POST requests to batch-resolve protein identifiers.

Parameters:
  • protein_ids (list[str]) – Ensembl protein identifiers, e.g. ["ENSP00000000233", ...].

  • batch_size (int) – Number of IDs per POST request. Maximum allowed by Ensembl is 1000.

Returns:

DataFrame with columns protein_id, gene_id, gene_name.

Return type:

ProteinToGene