[Bioperl-l] $seq->id() is read only

Ewan Birney birney@ebi.ac.uk
Thu, 12 Oct 2000 11:06:21 +0100 (GMT)


On Thu, 12 Oct 2000 hilmar.lapp@pharma.novartis.com wrote:

> 
> 
> 
> 
> Seq->display_id is just PrimarySeq->display_id
> 
> >From Seq.pm/display_id()
>   ...
>   $self->primary_seq->display_id($value);
> 
> id() for Seq just calls display_id() after having discarded the args.
> 
>      The first is certainly okay (delegation to primary_seq). Without
>      having the code in front of me, I guess then that id() could be
>      something different than display_id(), but for Bio::Seq it is not
>      (which I think is okay). The only bug is then that id() is get-only.
> 


Yeah. Bug/Feature.


the aim here was to discourage people from using a general ->id() get/set
but try to get people who want to set ids to set one of three ids

    - display_id = what you show to the user
    - accession_number = unique id for this biological database entry
    - primary_id = unique id for for this object

(notice valid to have two primary_id's with the same accession number)


I think you always need these three ids.


I suspect that chaining ->id() such that it is a synonmy for ->display_id
for the sets as well as the gets is "the right thing"


>           Hilmar
> 
> 
> 
> 
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
> 

-----------------------------------------------------------------
Ewan Birney. Mobile: +44 (0)7970 151230, Work: +44 1223 494420
<birney@ebi.ac.uk>. 
-----------------------------------------------------------------