[Biopython-dev] Should MultipleSequenceAlignment support iterator slicing?

Fabio Zanini fabio.zanini at fastmail.fm
Sun Feb 26 11:29:08 UTC 2012


On Tue, Feb 21, 2012 at 10:50:39PM +0000, Peter Cock wrote:
> On Tue, Feb 21, 2012 at 9:44 PM, Fabio Zanini <fabio.zanini at fastmail.fm> wrote:
> > Hi all!
> >
> > I am using the MultipleSequenceAlignment class a lot these days, and
> > would find it useful to get subalignments using python iterators. I
> > started a discussion on the issue tracker:
> >
> > https://redmine.open-bio.org/issues/3326
> >
> > Short version: I would like to do things like
> >
> > alignment[[4,5,8]]
> >
> 
> Does that sound useful enough to add (for rows and cols)?
> i.e. support row/col index lists - but not iterators?
>

Support for lists in both dimensions is already quite big of an
improvement and we should definitely implement this. This should cover
most use cases.

Since iterators can be iterated over only once, a memory efficient
solution for row+column double iterators, which do not convert any of
them into a list, is not that easy.

Let's introduce the list support for now!

Cheers,
Fabio



More information about the Biopython-dev mailing list