[Bioperl-l] seqfeature.display_id
Hilmar Lapp
hlapp@gnf.org
Tue, 8 Oct 2002 02:05:01 -0700
I implemented both Lincoln's suggestion and the seqname to seq_id
change. I.e., on Bio::SeqFeatureI, the former seqname() is now
seq_id(), and the former display_id() is now called display_name().
Also, display_name() is its own slot and not an alias any more in
SeqFeature::Generic.
There are aliases for the former names in SeqFeature::Generic, which
will print a deprecation message though.
I also suggested in an earlier email that we have consistency
problems in certain areas, especially naming of array accessors. It
occurred to me that get_XXXXs() appears to be newer naming
convention since it is used in a number of more recent modules (e.g.
RichSeq). So while I was at it I audaciously went ahead and changed
all_tags() and each_tag_value to get_all_tags and get_tag_values,
resp. There are aliases for the former names in SeqFeature::Generic,
and those don't print warnings (yet). If me having done this causes
an outrage and people think I went too far, I'll reverse it. To me,
the inconsistency does suck however, and I do frequently find myself
looking up the name of methods when the name should be obvious if it
followed a convention.
I'm also happy to carry around aliases for the previous names for a
while without even printing a warning, so the effect on existing
code will be minimal, while people writing new code against the
toolkit will hopefully be encouraged to follow the convention.
-hilmar
On Wednesday, October 2, 2002, at 08:04 AM, Heikki Lehvaslaiho wrote:
>
> I am always confused bby dispaly_id/dispaly_name, so I welcome anything
> that could make the distinction clearer.
>
> On Tue, 2002-10-01 at 18:11, Hilmar Lapp wrote:
>> I agree with this. That's why I proposed to
>>
>> 1) make the meaning absolutely clear and rename display_id to
>> display_name (but keep an undocumented alias)
>>
>> 2) fix the implementation in SeqFeature::Generic to refer to its own
>> attribute instead of being an alias for seqname()
>
> I wonder how many ids there are in seqfeatures?
>
> I've used heavily seq_id(), which is defined in Bio::LocationI,
> in Bio::Coodinate modules.
>
> Hilmar, before changeing anything, could you have look if there is some
> overlap between Bio::LocationI and Bio::SeqFeatureI that could be
> pruned
> out.
>
>
> -Heikki
>
>> Can I take your responses as agreement with me making these changes?
>>
>> Jason/Heikki, any comment or feeling on this?
>>
>> -hilmar
>>
>> On Tuesday, October 1, 2002, at 05:25 AM, Ewan Birney wrote:
>>
>>> On Tue, 1 Oct 2002, Lincoln Stein wrote:
>>>
>>>> Was there any further discussion on this? I do use display_id()
>>>> in the
>>>> Bio::Graphics module, and am confused about the distinction between
>>>> display_id() and seqname().
>>>
>>> IMNSHO
>>>
>>> display_id() == thing to be displayed for this object to a user
>>>
>>> seqname() == name of sequence attached - possibly better called
>>> seq_id or
>>> seq_accession_number() or something more obviously "real id like".
>>>
>>>
>>>
>>>
>>>
>> --
>> -------------------------------------------------------------
>> Hilmar Lapp email: lapp at gnf.org
>> GNF, San Diego, Ca. 92121 phone: +1-858-812-1757
>> -------------------------------------------------------------
>>
>> _______________________________________________
>> Bioperl-l mailing list
>> Bioperl-l@bioperl.org
>> http://bioperl.org/mailman/listinfo/bioperl-l
> --
> ______ _/ _/_____________________________________________________
> _/ _/ http://www.ebi.ac.uk/mutations/
> _/ _/ _/ Heikki Lehvaslaiho heikki@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
> ___ _/_/_/_/_/________________________________________________________
>
> _______________________________________________
> BioSQL-l mailing list
> BioSQL-l@open-bio.org
> http://open-bio.org/mailman/listinfo/biosql-l
>
--
-------------------------------------------------------------
Hilmar Lapp email: lapp at gnf.org
GNF, San Diego, Ca. 92121 phone: +1-858-812-1757
-------------------------------------------------------------