[ensembl-dev] retrieve DNA Sequence

Bronwen Aken ba1 at sanger.ac.uk
Tue Apr 19 13:50:23 BST 2011


Hi Erik,

Once you fetch your Gene object from the API, you could try:
my $slice = $slice_adaptor->fetch_by_gene_stable_id('ENSG00000012123',10000);
$slice->seq;
This will include 10kb up- and downstream of the gene.

You could also calculate the coordinates you'd like to fetch and then use:
$slice_adaptor->fetch_by_region();

There is more information under the SliceAdaptor section in our Pdoc:
http://www.ensembl.org/info/docs/Pdoc/ensembl/index.html

Thanks,
Bronwen

On 12 Apr 2011, at 21:39, Erik van Renselaar wrote:

> Given an organism (say: human) and a gene name (say: Leptin) I am looking for the location of the gene in the DNA sequence. I then want to download 10KBp upstream. Is anyone aware of code that can help me do this? I understand I can use Ensembl’s web interface but I am working on a project that requires me to pull this data programmatically.
> 
>  Any pointers would be greatly appreciated.
> 
> Many thanks in advance,
> 
> Erik van Renselaar
> 
> _______________________________________________
> Dev mailing list
> Dev at ensembl.org
> http://lists.ensembl.org/mailman/listinfo/dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20110419/c7380223/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2058 bytes
Desc: not available
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20110419/c7380223/attachment.p7s>


More information about the Dev mailing list