Help With Downloading Sequences From Ensembl
1
7
Entering edit mode
14.3 years ago

Hi All,

I am new to Ensembl Perl API. I searched for "olfactory receptor" in the Chicken Genome and I got 163 hits as genes. I want to download those genes and their nucleotide sequences. I was just wondering if you could provide a search term and the species' genome to be searched, using the Perl API ?

Thanks for your time

Regards
Sashi

ensembl perl sequence • 7.0k views
ADD COMMENT
5
Entering edit mode
14.3 years ago
Andrew Su 4.9k

The Ensembl Core API Tutorial has information on how to download sequences given an identifier. Specifically, see the description of the fetch_by_gene_stable_id function.

I don't see how the Ensembl Core API allows you to query by GO annotation (which is how I would get olfactory receptors). So I'd suggest checking out the BioMart API.

I don't think the API allows you to execute the search and download sequence in a single step, but you should be able to write a simple wrapper to execute those steps separately...

ADD COMMENT
0
Entering edit mode

Thank You Andrew for pointing me to the exact function.

ADD REPLY
0
Entering edit mode

Thanks Andrew. Do you know how I can get all the Ensembl GeneIDs of the hits I get for a search term. Do I have to just parse the html ?? The search for "olfactory receptor Gallus gallus" in GenBank Genes database gives me more number of hits than in ensembl. (480 over 163). May I ask you which number you would consider. Is ensembl better annotated than genbank??

If I get geneids I can either use bioperl or use BioMart to get the sequences.

ADD REPLY
0
Entering edit mode

No, I don't think you want to screen-scape the HTML. I think you should do your query at BioMart (input: GO term, output: Ensembl gene IDs). First use the MartView GUI to do your query by hand, and then if you need to access it programmatically, then use the API. After you get the IDs from BioMart, then I think you download sequence from Ensembl. That's how I would do it anyway. (Clearly, some details in there that you'll need to fill in...)

ADD REPLY

Login before adding your answer.

Traffic: 2252 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6