Question: how to download a list of snps with all details for a specific gene from Ensembl via python
gravatar for SOS
3 months ago by
SOS10 wrote:

Hi everyone, I tried to download the details of SNPs for a specific gene from the Ensembl database via Biomart but unfortunately did not get any results.

Could anyone please help me to use python for that?

Thanks a lot

ensembl snp python gene • 162 views
ADD COMMENTlink modified 3 months ago by Ben_Ensembl1.4k • written 3 months ago by SOS10

One question at a time! The essence of computer programming is to break down your question into steps that can be solved. You want to download SNP data, does it have to be from Ensembl? If that's difficult, consult their documentation. Or is Biomart really necessary? maybe they have tutorials at the Biomart side? Why "Via Python" ? is this really a homework question, because I don't know why anyone would choose to use a programming language they're not already good at. If you're trying to learn Python, don't mix that up with biomart and ensembl at the same time!

ADD REPLYlink written 3 months ago by karl.stamm3.6k
gravatar for Ben_Ensembl
3 months ago by
Ben_Ensembl1.4k wrote:


You can use BioMart for this query. You will need to use the variation database, using the stable ID of your gene of interest as a filter in GENE ASSOCIATED FILTERS -> Gene Stable ID(s).

If you want to use Python, you can use the Overlap endpoint in the REST API:

Best wishes

Ben Ensembl Helpdesk

ADD COMMENTlink written 3 months ago by Ben_Ensembl1.4k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 833 users visited in the last hour