[Dynamite] Is this working now then?
Ian Holmes
ihh@fruitfly.org
Sun, 5 Mar 2000 21:54:55 -0800 (PST)
On Mon, 6 Mar 2000, Ewan Birney wrote:
> > Revised:
> >
> > > module Seq {
> > >
> > > struct LightSeqMomento {
> > > string name;
> > > string seq;
> > > };
> > >
> > > interface LightSeq {
> > > string name();
actually now i think the name should be an attribute after all.
oh well -- i'll change it when the wiki's up... :)
> > > 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);
> };
How about
interface SequentialAccessDatabase {
DatabaseSeqIterator make_DatabaseSeqIterator();
}
interface RandomAccessDatabase : SequentialAccessDatabase {
DatabaseSeq get_DatabaseSeq_from_id(in string implementation_id);
sequence<string> all_implementation_ids(); // (perhaps)
}
...so we can e.g. stream through a FASTA file without worrying about
building an index.
Ian