[ensembl-dev] bug in the Ensembl core API?

Bert Overduin bert at ebi.ac.uk
Thu May 2 16:11:32 BST 2013


Hello Electra,

I don't think this is wrong / a bug as, as far as I know, a slice always
encompasses both strands. So, you should do the filtering for features that
are located on the forward or reverse strand after retrieving them from the
slice.

But maybe I'm wrong ....

Cheers,
Bert




On Thu, May 2, 2013 at 4:04 PM, Electra Tapanari <et3 at sanger.ac.uk> wrote:

>
>
>
> Hi all,
>
> I came across a problem when using the ensembl core API.
>
> When I am getting a slice where I define chromosome, start, end and
> strand and then I get objects from the slice ie,
> genes/transcripts/introns etc it returns me objects from both strands.
>
>
> I used this code to test this:
>
>   use strict;
>   use Gencode::Default;
>
>
>   #connect to database
>   my $db = Gencode::Default->dbconnect("**ens-livemirror", 3306,
> "homo_sapiens_core_71_37", "ensro", undef);
>
>   my $sa = $db->get_SliceAdaptor();
>
>   my $slice=$sa->fetch_by_region('**chromosome',"3",20000,600000,-**1) or
> die "\n 1.Couldn't get slice\n";
>
>   foreach my $gene (@{$slice->get_all_Genes}){
>
>       $gene=$gene->transform('**chromosome');
>       print $gene->stable_id."\t".$gene->**strand."\n";
>
>    }
>
>
> This is the output:
>
> ENSG00000223587    1
> ENSG00000224918    -1
> ENSG00000224318    -1
> ENSG00000134121    1
> ENSG00000252017    -1
> ENSG00000231660    -1
> ENSG00000234661    -1
> ENSG00000224957    1
>
>
> Isn't this wrong? that it returns me genes from both strands since I am
> defining that I am interested in the slice of the negative strand only?
>
> many thanks in advance,
> Electra
>
> --
> Electra Tapanari
> Bioinformatician-Gencode Data Coordinator
> Havana Group
> Morgan Building
> Wellcome Trust Sanger Institute
> Wellcome Trust Genome Campus
> Hinxton
> Cambridgeshire
> CB10 1HH
>
> E: electra.tapanari at sanger.ac.uk
> T: +44 1223 496827
>
>
>
>
> ______________________________**_________________
> Dev mailing list    Dev at ensembl.org
> Posting guidelines and subscribe/unsubscribe info:
> http://lists.ensembl.org/**mailman/listinfo/dev<http://lists.ensembl.org/mailman/listinfo/dev>
> Ensembl Blog: http://www.ensembl.info/
>



-- 
Bert Overduin, Ph.D.
Vertebrate Genomics Team

EMBL - European Bioinformatics Institute
Wellcome Trust Genome Campus
Hinxton, Cambridge CB10 1SD
United Kingdom

http://www.ebi.ac.uk/~bert

Ensembl browser: http://www.ensembl.org

Mailing lists: http://www.ensembl.org/info/about/contact/mailing.html

Blog: http://www.ensembl.info

YouTube: http://www.youtube.com/user/EnsemblHelpdesk
Facebook: http://www.facebook.com/Ensembl.org
Twitter: http://twitter.com/Ensembl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20130502/98bf32c4/attachment.html>


More information about the Dev mailing list