[Dynamite] Is this working now then?
Ewan Birney
birney@ebi.ac.uk
Mon, 6 Mar 2000 05:28:21 +0000 (GMT)
On Sun, 5 Mar 2000, Ian Holmes wrote:
> Just spotted a gotcha in this...
>
>
> These two should be methods & not attributes I think.
> Also I reckon we need a length() method so we don't have to retrieve the
> whole sequence (which might, as Ewan pointed out, be a behemoth spanning
> several contigs) to find this.
>
Right. Good stuff.
> Revised:
>
> > module Seq {
> >
> > struct LightSeqMomento {
> > string name;
> > string seq;
> > };
> >
> > interface LightSeq {
> > string name();
> > string seq();
> > int length(); // need a length method because we might not want to retrieve the whole seq()
> > string subseq(in long start, in long end);
> > LightSeqMomento make_LightSeqMomento();
> > };
> >
> > interface DatabaseSeq : LightSeq {
> > attribute string implementation_id; // implementation unique id
> > attribute string accession_number; // biological unique id
> > };
> >
> > }
>
Ok.
Now we need something like....
interface DatabaseSeqIterator {
DatabaseSeq next();
boolean at_end();
};
// even if we are in module 'Seq', Database might be a little
// too generic a name
interface Database {
DatabaseSeqIterator make_DatabaseSeqIterator();
DatabaseSeq get_DatabaseSeq_from_id(in string implementation_id);
};
And we are done for sequences
(except - where does this fecking alphabet shit go?)