This is a test version of Biostars. For the public version, visit https://www.biostars.org.
how to download a list of snps with all details for a specific gene from Ensembl via python

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

snp python ensembl gene

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!

1 answer

Hi SOS,

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: http://rest.ensembl.org/documentation/info/overlap_id

Best wishes

Ben Ensembl Helpdesk

can I do this by just putting a gene symbol?

Log in to answer this question.