[ensembl-dev] Dev Digest, Vol 5, Issue 15

Steve Moss gawbul at gmail.com
Sat Nov 13 20:35:22 GMT 2010


Hi Andrea,

Hi Andrea,

Hi
>
> Is there an obvious way to get all of the introns for a gene or do I
> have to keep track of the bases in between exons and work it out 'manually'
>
> thanks


Introns aren't explicitly defined in the EnsEMBL database and are instead
built from the exons using the get_Introns() methods of the transcript
object. As there can be multiple transcripts per gene, which share exons,
retrieving all introns for all transcripts of a gene will return redundant
data. The best way to get around this it to retrieve the canonical
transcript using the gene object and then retrieve all introns from that.

For example you can set-up a gene adaptor and retrieve all gene stable ids
using the list_stable_ids() method and then retrieve the canonical
transcript for each gene stable id using the canonical_transcript() method
and then call get_Introns() on the resulting transcriopt .

See the pdoc for more information
http://www.ensembl.org/info/docs/Pdoc/ensembl/index.html on functionality
that isn't listed in the main tutorial.

Cheers,

Steve

On 13 November 2010 12:00, <dev-request at ensembl.org> wrote:

> Send Dev mailing list submissions to
>        dev at ensembl.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        http://lists.ensembl.org/mailman/listinfo/dev
> or, via email, send a message with subject or body 'help' to
>        dev-request at ensembl.org
>
> You can reach the person managing the list at
>        dev-owner at ensembl.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Dev digest..."
>
>
> Today's Topics:
>
>   1. list of chromosomes in an organism (Andrea Edwards)
>   2. Re: list of chromosomes in an organism (simon andrews (BI))
>   3. Re: list of chromosomes in an organism (Andrea Edwards)
>   4. Re: list of chromosomes in an organism (Anne Parker)
>   5. get all introns for a gene (Andrea Edwards)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 12 Nov 2010 14:36:39 +0000
> From: Andrea Edwards <edwardsa at cs.man.ac.uk>
> Subject: [ensembl-dev] list of chromosomes in an organism
> To: Dev at ensembl.org
> Message-ID: <4CDD50F7.1020308 at cs.man.ac.uk>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> hi
>
> how do you get the list of chromosomes in an organism via the perl api?
>
> I ask because I'm trying to get the cow Z chromosome and can't access
> it. It is labelled MT in the genome browser so I have tried
>
> $slice = $slice_adaptor->fetch_by_region('chromosome','Z');
> $slice = $slice_adaptor->fetch_by_region('chromosome','MT');
>
> and neither work
>
> Thanks a lot
>
>
>
> ------------------------------
>
> Message: 2
> Date: Fri, 12 Nov 2010 14:52:31 +0000
> From: "simon andrews (BI)" <simon.andrews at bbsrc.ac.uk>
> Subject: Re: [ensembl-dev] list of chromosomes in an organism
> To: dev ensembl <Dev at ensembl.org>
> Message-ID: <77C8A039-14A7-4ABC-98D3-F0580DA2B5FD at bbsrc.ac.uk>
> Content-Type: text/plain; charset="us-ascii"
>
>
> On 12 Nov 2010, at 14:36, Andrea Edwards wrote:
>
> > hi
> >
> > how do you get the list of chromosomes in an organism via the perl api?
>
> We use:
>
> my @chr_slices = @{$db_adapter -> get_adaptor('slice') ->
> fetch_all('chromosome',undef,0,1)};
>
> You can then call $chr_slices[0]->seq_region_name() on each of the chr
> slices to get the actual name.
>
> Simon.
>
>
>
>
> ------------------------------
>
> Message: 3
> Date: Fri, 12 Nov 2010 14:52:42 +0000
> From: Andrea Edwards <edwardsa at cs.man.ac.uk>
> Subject: Re: [ensembl-dev] list of chromosomes in an organism
> To: Dev at ensembl.org
> Message-ID: <4CDD54BA.2060008 at cs.man.ac.uk>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Hi
>
> I made a mistake in my last message, wasn't concentrating. I should have
> said:
>
>  I have got a list of the chromosomes
> in the cow genome using the perl API and the 'Y' chromosome is named MT.
> However I can't retrieve this chromosome using either of the following
>
> $slice = $slice_adaptor->fetch_by_region('chromosome','Y');
> $slice = $slice_adaptor->fetch_by_region('chromosome','MT');
>
> The $slice is undefined
>
> I did this workaround to get chromsomes 1-29, X and MT
>
> @slices = @{ $slice_adaptor->fetch_all('chromosome') };
> foreach $slice (@slices) {
>
>     unless ($slice->seq_region_name() =~ /Un/) {
>         .....
>     }
> }
>
> But i was curious why I couldn't get MT directly
>
> thanks
>
>
> On 12/11/2010 14:36, Andrea Edwards wrote:
> > hi
> >
> > how do you get the list of chromosomes in an organism via the perl api?
> >
> > I ask because I'm trying to get the cow Z chromosome and can't access
> > it. It is labelled MT in the genome browser so I have tried
> >
> > $slice = $slice_adaptor->fetch_by_region('chromosome','Z');
> > $slice = $slice_adaptor->fetch_by_region('chromosome','MT');
> >
> > and neither work
> >
> > Thanks a lot
> >
> > _______________________________________________
> > Dev mailing list
> > Dev at ensembl.org
> > http://lists.ensembl.org/mailman/listinfo/dev
>
>
>
>
> ------------------------------
>
> Message: 4
> Date: Fri, 12 Nov 2010 15:41:12 +0000
> From: Anne Parker <ap5 at sanger.ac.uk>
> Subject: Re: [ensembl-dev] list of chromosomes in an organism
> To: Andrea Edwards <edwardsa at cs.man.ac.uk>
> Cc: Dev at ensembl.org
> Message-ID: <AE514DA8-16C7-45B9-8EF1-92881697AF44 at sanger.ac.uk>
> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
>
> There is no Y chromosome in the cow genome, because the reference
> genome is female :)
>
> On 12 Nov 2010, at 14:52, Andrea Edwards wrote:
>
> > Hi
> >
> > I made a mistake in my last message, wasn't concentrating. I should
> > have said:
> >
> > I have got a list of the chromosomes
> > in the cow genome using the perl API and the 'Y' chromosome is named
> > MT. However I can't retrieve this chromosome using either of the
> > following
> >
> > $slice = $slice_adaptor->fetch_by_region('chromosome','Y');
> > $slice = $slice_adaptor->fetch_by_region('chromosome','MT');
> >
> > The $slice is undefined
> >
> > I did this workaround to get chromsomes 1-29, X and MT
> >
> > @slices = @{ $slice_adaptor->fetch_all('chromosome') };
> > foreach $slice (@slices) {
> >
> >    unless ($slice->seq_region_name() =~ /Un/) {
> >        .....
> >    }
> > }
> >
> > But i was curious why I couldn't get MT directly
> >
> > thanks
> >
> >
> > On 12/11/2010 14:36, Andrea Edwards wrote:
> >> hi
> >>
> >> how do you get the list of chromosomes in an organism via the perl
> >> api?
> >>
> >> I ask because I'm trying to get the cow Z chromosome and can't
> >> access it. It is labelled MT in the genome browser so I have tried
> >>
> >> $slice = $slice_adaptor->fetch_by_region('chromosome','Z');
> >> $slice = $slice_adaptor->fetch_by_region('chromosome','MT');
> >>
> >> and neither work
> >>
> >> Thanks a lot
> >>
> >> _______________________________________________
> >> Dev mailing list
> >> Dev at ensembl.org
> >> http://lists.ensembl.org/mailman/listinfo/dev
> >
> >
> > _______________________________________________
> > Dev mailing list
> > Dev at ensembl.org
> > http://lists.ensembl.org/mailman/listinfo/dev
>
> Anne Parker
> Ensembl Web Production Manager
> http://www.ensembl.org
>
>
>
>
>
>
> ------------------------------
>
> Message: 5
> Date: Sat, 13 Nov 2010 00:24:26 +0000
> From: Andrea Edwards <edwardsa at cs.man.ac.uk>
> Subject: [ensembl-dev] get all introns for a gene
> To: Dev at ensembl.org
> Message-ID: <4CDDDABA.10603 at cs.man.ac.uk>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Hi
>
> Is there an obvious way to get all of the introns for a gene or do I
> have to keep track of the bases in between exons and work it out 'manually'
>
> thanks
>
>
>
> ------------------------------
>
> _______________________________________________
> Dev mailing list
> Dev at ensembl.org
> http://lists.ensembl.org/mailman/listinfo/dev
>
>
> End of Dev Digest, Vol 5, Issue 15
> **********************************
>



-- 
Kindest regards,

Steve Moss
http://stevemoss.ath.cx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ensembl.org/pipermail/dev_ensembl.org/attachments/20101113/fbdd8d37/attachment.html>


More information about the Dev mailing list