[ensembl-dev] SQL query to retrieve gene sequence... (Andrew Yates)

Steve Moss gawbul at gmail.com
Tue Dec 16 20:11:14 GMT 2014

Dear Andy,

Thanks for the swift reply. I realised when looking through the assembly
table that there were a lot of (~13000) records matching the gene
seq_region_id, but wasn't sure exactly how to trace my way back through to
the actual gene sequence.

The reason I was wanting to do this, was to look at the difference in
resource utilisation (memory, cpu, runtime etc.) of the different methods
of accessing EnsEMBL data. I had already coded some stuff up in Perl and
Python (I prefer Python for general development work, but have used Perl,
and others, for a lot longer), and used curl via the REST API too. It was
also out if personal interest to gain greater insight and understanding of
the internal mechanisms of the EnsEMBL API and databases.



On 16 December 2014 at 16:48, <dev-request at ensembl.org> wrote:
> Message: 1
> Date: Tue, 16 Dec 2014 16:28:58 +0000
> From: Andrew Yates <ayates at ebi.ac.uk>
> Subject: Re: [ensembl-dev] SQL query to retrieve gene sequence...
> To: Ensembl developers list <dev at ensembl.org>
> Message-ID: <469F4D6A-436C-46C2-9340-535201787788 at ebi.ac.uk>
> Content-Type: text/plain; charset="utf-8"
> Hey Steve,
> The problem with using the database is that sequence is not stored against
> the top-level sequences annotation is held against. Instead sequence is
> held against the contig sequence regions which requires descending through
> the assembly table an unspecified number of times (once for each mapping
> e.g. chromosome -> supercontig -> contig).
> I would seriously *not* recommend doing this. Not only do you have to deal
> with descending down the assembly but also having to think about
> concatenating the sequence & paying attention to the orientation of
> assembly. Instead you could use the Perl API (probably not an option
> considering you?re a Python guy), BioMart (you can access unspliced gene
> sequence quite easily), the REST API or download the full genome sequence
> from FTP and doing subslices. The faindex index tool from htslib/samtools
> is pretty good at extracting arbitrary sequence from very large FASTA files.
> Andy
> ------------
> Andrew Yates - Ensembl Support Coordinator
> European Molecular Biology Laboratory
> European Bioinformatics Institute
> Wellcome Trust Genome Campus
> Hinxton, Cambridge
> CB10 1SD, United Kingdom
> Tel: +44-(0)1223-492538
> Fax: +44-(0)1223-494468
> Skype: andrewyatz
> http://www.ensembl.org/


Steve Moss
[image: Steve Moss on about.me]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20141216/d16b5275/attachment.html>

More information about the Dev mailing list