This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to transform rownames of a RNA Seq dataset with gene names to ENSG format?

I have a RNA Seq data set with gene names such as TP53, MDM2, ... . I want to transform these rownames into ENSG format.

For example: TP53 should be ENSG00000141510.

What is the best way to given each rowname replace rowname with ENSG format of the gene?

Best Regards!

geneid rna-seq ensembl gsea

If you are looking for a python version, you can use sanbomics' function.

pip install sanbomics

Your code which assumes you have a pandas dataframe df with a column named gene.

from sanbomics.tools import id_map

mapper = id_map(species='human', key='symbol', target='ensembl')
mapper.map_column(df, column='gene')

1 answer

See the answers here : Conversion of Gene Name to Ensembl ID

Log in to answer this question.