Skip to content

BioMart #
Find similar titles

BioMart is a community-driven project to provide a single point of access to distributed research data for Genomics. (

EBI에서 운영하는 유전체 데이터베이스. 미국에는 UCSC Table Browser가 유사하다.

아래 코드는 Ensembl transcript id를 gene id로 매핑하는 사전을 저장한다.

import biomart
import pickle

server = biomart.BiomartServer('')
mart = server.datasets['hsapiens_gene_ensembl']
response ={
    'attributes': ['ensembl_transcript_id', 'ensembl_gene_id'],
data ='ascii')

d = {}
for line in data.splitlines():
    ensembl_transcript_id, ensembl_gene_id = line.split('\t')
    d[ensembl_transcript_id] = ensembl_gene_id

with open('map_from_enst_2_ensg.pkl', 'wb') as f:
    pickle.dump(d, f)

Suggested Pages #