[ensembl-dev] Get transcripts for a given exon
Luke Goodsell
Luke.Goodsell at ogt.com
Wed Mar 4 15:50:32 GMT 2015
Hi Kieron,
That works perfectly. Many thanks!
Luke
-----Original Message-----
From: dev-bounces at ensembl.org [mailto:dev-bounces at ensembl.org] On Behalf Of Kieron Taylor
Sent: 04 March 2015 15:34
To: Ensembl developers list
Subject: Re: [ensembl-dev] Get transcripts for a given exon
Dear Luke,
You have quite justifiably not noticed the TranscriptAdaptor->fetch_all_by_exon_stable_id() method. That is provided you have the Ensembl stable IDs…
You might do something like:
my $adaptor = $registry->get_adaptor($species,’core’,Transcript);
foreach my $exon (@list_of_exons) {
my $transcripts = $adaptor->fetch_all_by_exon_stable_id($exon->stable_id);
… act on transcript list here
}
Regards,
Kieron
Kieron Taylor PhD.
Ensembl Core senior software developer
EMBL, European Bioinformatics Institute
> On 4 Mar 2015, at 15:25, Luke Goodsell <Luke.Goodsell at ogt.com> wrote:
>
> Hi,
>
> I would like to be able to retrieve all the transcript objects to which a given exon object belongs. The only way that I can see, is to get all overlapping genes, get the transcripts for those genes, get the exons for those transcripts and check if the exon of interest is returned.
>
> Is there a more elegant way that I've overlooked?
>
> Kind regards,
> Luke
>
> <winmail.dat>_______________________________________________
> Dev mailing list Dev at ensembl.org
> Posting guidelines and subscribe/unsubscribe info: http://lists.ensembl.org/mailman/listinfo/dev
> Ensembl Blog: http://www.ensembl.info/
_______________________________________________
Dev mailing list Dev at ensembl.org
Posting guidelines and subscribe/unsubscribe info: http://lists.ensembl.org/mailman/listinfo/dev
Ensembl Blog: http://www.ensembl.info/
More information about the Dev
mailing list