[Biocorba-l] Part II - Annotations on a Seq

Alan Robinson alan@ebi.ac.uk
Mon, 12 Feb 2001 18:29:00 +0000 (GMT Standard Time)


2) At the moment, you cannot attach general annotations to an entire
   sequence; only SeqFeature's that include a specific location upon the
   sequence.

Solution 1: Specify that an annotation that applies to the whole sequence
has start=1 and end='length of sequence'

Solution 2: Have an interface 'Annotation' that takes the location
independent stuff out of SeqFeature. Then SeqFeature inherits from
Annotation:

  interface Annotation : GNOME::Unknown 
  {
    string type();
    string source();
    string seq_primary_id();
    NameValueSet qualifiers();
  };

  interface SeqFeature : Annotation 
  {
   // Everything else that was in SeqFeature previously.
  };


To the 'Seq' interface add a method to return the Annotation objects. This
would also require the addition of an AnnotationVector and
AnnotationIterator interfaces [unless we want to handle this as a simple
CORBA sequence with 'typedef sequence<Annotation> AnnotationList'?]:

  interface Seq : PrimarySeq 
  {
    // ...
    AnnotationVector annotations();
  };


  interface AnnotationVector : GNOME::Unknown 
  {
    long size();
    Annotation elementAt(in long index)
      raises (OutOfRange);
    AnnotationIterator iterator();
  };

  interface AnnotationIterator : GNOME::Unknown 
  {
    Annotation next()
      raises (EndOfStream);
    boolean has_more();
  };


--
============================================================
Alan J. Robinson, D.Phil.             Tel:+44-(0)1223 494444
European Bioinformatics Institute     Fax:+44-(0)1223 494468
EMBL Outstation - Hinxton             Email:  alan@ebi.ac.uk
Wellcome Trust Genome Campus
Hinxton, Cambridge
CB10 1SD, UK                http://industry.ebi.ac.uk/~alan/
============================================================