Bioperl: Alignment Thoughts
Ewan Birney
birney@sanger.ac.uk
Fri, 29 Jan 1999 15:55:17 +0000 (GMT)
On Thu, 28 Jan 1999, Lincoln Stein wrote:
> Ewan's proposal is really very thought provoking. After reading
> through it, I thought of an API that might be a useful avenue to
> pursue.
[thanks]
>
> The Alignment class (or whatever we want to call it) should appear to
> be array-like to the application programmer. Conceptually, the
> alignment uses the indexing system of the fully-gapped consensus
> sequence, without necessarily generating a consensus. One nice way to
> implement Alignment objects would be a tied array.
>
> To create an Alignment, you pass it a series of Alignable objects,
> which implement an Alignable "interface" (Multiple inheritance
> anyone?) Wouldn't it be neat if Alignable implemented array tieing as
> well?
>
> When you index into an Alignment object, what value do you get? You
> get an AlignmentIndex object, which contains all the information
> needed to recover the state of each Alignable within the Alignment.
> When you index into an Alignable, you get an Alignment::Info object,
> or some such.
>
> Conceptually:
>
> tie (@sequence1,Alignable::Sequence,...);
> tie (@sequence2,Alignable::Sequence,...);
> tie (@alignment,Alignment::CLUSTALW,$sequence1,$sequence2);
> $index = $alignment[32];
> $info1 = $sequence1[$index];
> $info2 = $sequence2[$index];
> $start = $info1->start;
> $end = $info1->end;
> $type = $info1->type;
>
I am sure completely the logic of what you are saying but I am pretty
sure that it is close to ideas that Michele clamp and I had about
alignments, presented to the LSR committee for CORBA. I'll see if it
matches up. It is good to know that more than one person comes up with
the same sort of framework.
thanks for this. I'm still waiting for more comments before I start
sketching out the interfaces.
> All the smarts is now moved into the AlignmentIndex object, which can
> be treated as an opaque object that the programmer just passes around.
>
> One of the nice things about the Alignment tie interface is that it
> should be possible to implement push(), pop(), splice() and so forth
> by passing AlignmentIndex objects to those operators, allowing the
> alignment to be edited in an (almost) natural way.
>
> Lincoln
>
> --
> ========================================================================
> Lincoln D. Stein Cold Spring Harbor Laboratory
> lstein@cshl.org Cold Spring Harbor, NY
> Positions available at my lab: see http://stein.cshl.org/#hire
> ========================================================================
> =========== Bioperl Project Mailing List Message Footer =======
> Project URL: http://bio.perl.org/
> For info about how to (un)subscribe, where messages are archived, etc:
> http://www.techfak.uni-bielefeld.de/bcd/Perl/Bio/vsns-bcd-perl.html
> ====================================================================
>
Ewan Birney
<birney@sanger.ac.uk>
http://www.sanger.ac.uk/Users/birney/
=========== Bioperl Project Mailing List Message Footer =======
Project URL: http://bio.perl.org/
For info about how to (un)subscribe, where messages are archived, etc:
http://www.techfak.uni-bielefeld.de/bcd/Perl/Bio/vsns-bcd-perl.html
====================================================================