[Baypiggies] Fwd: nested list help

Vikram K kpguy1975 at gmail.com
Tue Jul 27 16:19:26 CEST 2010


---------- Forwarded message ----------
From: Vikram K <kpguy1975 at gmail.com>
Date: Tue, Jul 27, 2010 at 7:48 PM
Subject: Re: [Baypiggies] nested list help
To: Glen Jarvis <glen at glenjarvis.com>


Hi Glen,
 the elements of the original list will never contain a duplicate element.
The numbers other than the NMID are actually representing exon coordinates
and the joining is being done to represent the fact that exons (or rather
exon coordinates) corresponding to the same NMID are joined together to
represent splicing during transcription from DNA to mRNA.


On Tue, Jul 27, 2010 at 7:31 PM, Glen Jarvis <glen at glenjarvis.com> wrote:

> To help define the problem, what behavior do you expect if the second
> element of your original list also contains a duplicate element. In this
> example, what result are you looking for if your second element was
> ['NM100', 7, 11, 12, 13]
>
> Glen
>
>
>
> > Suppose i have this nested list:
> >
> > >>> x
> > [['NM100', 3, 4, 5, 6, 7], ['NM100', 10, 11, 12, 13], ['NM200', 15, 16,
> 17]]
> > >>> for i in x:
> > ...   print i
> > ...
> > ['NM100', 3, 4, 5, 6, 7]
> > ['NM100', 10, 11, 12, 13]
> > ['NM200', 15, 16, 17]
> > >>>
> >
> > how do i obtain from the above the following nested list:
> >
> > >>> z
> > [['NM100', 3, 4, 5, 6, 7, 10, 11, 12, 13], ['NM200', 15, 16, 17]]
> > >>> for i in z:
> > ...   print i
> > ...
> > ['NM100', 3, 4, 5, 6, 7, 10, 11, 12, 13]
> > ['NM200', 15, 16, 17]
> > >>>
> >
> > _______________________________________________
> > Baypiggies mailing list
> > Baypiggies at python.org
> > To change your subscription options or unsubscribe:
> > http://mail.python.org/mailman/listinfo/baypiggies
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/baypiggies/attachments/20100727/56679308/attachment.html>


More information about the Baypiggies mailing list