[Bioperl-l] {SPECS] Sequence meta data

Heikki Lehvaslaiho heikki at ebi.ac.uk
Mon Mar 31 17:15:37 EST 2003


On Mon, 2003-03-31 at 14:48, Robson Francisco de Souza wrote:
> 	Hi Heikki,
> 
> On 31 Mar 2003, Heikki Lehvaslaiho wrote:
> ...snip...
> > NAME
> >     Bio::Seq::MetaI - Interface for sequence objects with residue-based
> > meta
> >     information
> > 
> ...snip...
> > DESCRIPTION
> >     The length of the meta data sequence is not dependent on the amount 
> >     of the quality information. The meta information always covers all 
> >     the residues, but a blank value is used to denote unavailable 
> >     information. If necessary the implementation quietly truncates or 
> >     extends metain formation with blank values. Definition of blank is 
> >     implementation dependent. Gaps in MSAs should not have meta 
> >     information.
> 
> 	Isn't such a restriction a drawback? Do you really think it's
> necessary? I think it would be nice being able to associate meta data to
> gap positions... maybe annotations or qualities (like phrap does)...

Glad to be proven wrong. Luckily, I have not done anything that actually
prevents gaps having meta data, so I just delete the sentence.

> >     At this point a residue in a sequence object can have only one meta
> >     value. If you need more, use multiple copies of the sequence object.
> 
> 	Why? You create Bio::Seq::MetaI objects by blessing sequence
> objects and latter attaching a data structure holding the meta data,
> either a string, anonymous hash or array. If you extend the interface a
> little more you could allow named meta data sets, like
> 
> 	$meta_values = $obj->meta($new_name, $new_values);
> 
> and an access call would be like
> 
> 	$meta_values = $obj->meta($new_name);	

You are absolutely right. I wanted to have a simplest possible interface
done first. If more complex meta data is needed, the arguments need to
be extended like you described or maybe:

$meta_values = $obj->meta($new_values); # default/first meta set
$meta_values = $obj->meta($new_values, $set_name/order number);

Since one should not force interface to be unncessarily complicated and
writing 'undef' as the first argument is not clean.


Thanks for you comments,

	-Heikki
> 	Of course this forces users to name all meta data but this way you
> won't need extra, redundant copies of the sequence object, which may need
> a lot of space.
> 	Hope I haven't missed the point :). Nice modules! :)
> 	Cheers,
> 			Robson
-- 
______ _/      _/_____________________________________________________
      _/      _/                      http://www.ebi.ac.uk/mutations/
     _/  _/  _/  Heikki Lehvaslaiho          heikki at ebi.ac.uk
    _/_/_/_/_/  EMBL Outstation, European Bioinformatics Institute
   _/  _/  _/  Wellcome Trust Genome Campus, Hinxton
  _/  _/  _/  Cambs. CB10 1SD, United Kingdom
     _/      Phone: +44 (0)1223 494 644   FAX: +44 (0)1223 494 468
___ _/_/_/_/_/________________________________________________________



More information about the Bioperl-l mailing list