This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Where Can I Download A File That Has All (human) Ensembl Gene Ids, Transcript Ids, and Protein Ids

Is there a way to get this type of data, so at the end I will have a file like this format:

ENSGxxxxx    [tab]    ENSTxxxxx    [tab]    ENSPxxxxx
ENSGxxxxx    [tab]    ENSTxxxxx    [tab]    ENSPxxxxx
ENSGxxxxx    [tab]    ENSTxxxxx    [tab]    ENSPxxxxx
ENSGxxxxx    [tab]    ENSTxxxxx    [tab]    ENSPxxxxx
ENSGxxxxx    [tab]    ENSTxxxxx    [tab]    ENSPxxxxx
ensembl gene transcript

1 answer

Download the protein fasta file from Ensembl, e.g. from here and then (in case of the human file):

awk '{if ($1 ~ /^>/ ) print}' <(gzcat Homo_sapiens.GRCh38.pep.all.fa.gz) \
| awk -F " " 'OFS="\t" {print $4, $5, $1}' \
| awk 'OFS="\t" {gsub("gene:","");gsub("transcript:","");gsub(">","");print}' > output.tsv

Would give some:

ENSG00000237235.2   ENST00000434970.2   ENSP00000451515.1
ENSG00000223997.1   ENST00000415118.1   ENSP00000451042.1
ENSG00000228985.1   ENST00000448914.1   ENSP00000452494.1
ENSG00000282253.1   ENST00000631435.1   ENSP00000488240.1
ENSG00000282431.1   ENST00000632684.1   ENSP00000487941.1
ENSG00000211923.1   ENST00000390583.1   ENSP00000419773.1
ENSG00000232543.2   ENST00000431440.2   ENSP00000430034.1
ENSG00000282455.1   ENST00000632524.1   ENSP00000488695.1
ENSG00000282323.1   ENST00000633009.1   ENSP00000488000.1
ENSG00000282724.1   ENST00000634070.1   ENSP00000488392.1
(...)

Log in to answer this question.