[Bioperl-l] Bio::SeqFeature->feature_seq

Lincoln Stein lstein@cshl.org
Wed, 11 Sep 2002 08:02:19 -0400


Calling the method spliced_seq() will avoid any confusion as to what the 
method does.  Providing an alias to seq() called unspliced_seq() will help 
too.  The drawback is that the term is too specific to spliced transcripts.

What are the other use cases where someone wants to join a split location from 
Genbank?

Here's a more generic method name that also conveys the idea without risking 
confusion with seq():

	joined_seq()

Lincoln

On Wednesday 11 September 2002 2:45 am, Ewan Birney wrote:
> On Tue, 10 Sep 2002, Hilmar Lapp wrote:
> > Sounds good.
> >
> > To tell you the truth I anticipate confusion about what $feat->seq()
> > does and what $feat->feature_seq() would do, and why they don't always
> > do the same, and when they actually do the same and when not. I'm still
> > not 100% convinced that $feat->seq() shouldn't simply do what you
> > describe for $feat->feature_seq(), even though the remote seq fetching
> > is maybe too fancy for $feat->seq().
>
> I am sure we will get confusion, but I *know* that some people are relying
> on $feat->seq() provides extent-of-feature semantics. So... I don't know
> what to do - break backward compatibility so that new users have an easier
> learning curve or try to finesse new users with the right documentation to
> the right function names.
>
>
> More than happy to hear opinions, but I think we are in a bit of a bind...
>
> > My $0.02.
> >
> > 	-hilmar
> >
> > > -----Original Message-----
> > > From: Ewan Birney [mailto:birney@ebi.ac.uk]
> > > Sent: Tuesday, September 10, 2002 11:09 AM
> > > To: bioperl-l@bioperl.org
> > > Subject: [Bioperl-l] Bio::SeqFeature->feature_seq
> > >
> > >
> > >
> > >
> > > Here is the proposed spec for a new function on SeqFeatureI,
> > > to provide more "magic" for the users.
> > >
> > > the main use case is to be able to get out the "cdna" from a join'd
> > > embl/genbank record without too much horsing around.
> > >
> > >
> > > Notice it does not throw on remote locations with no db. Thoughts?
> > >
> > >
> > >   Title   : feature_seq
> > >
> > >   Usage   : $seq = $feature->feature_seq()
> > >             $seq =
> > > $feature_with_remote_locations->feature_seq($db_for_seqs)
> > >
> > >   Function: Provides a sequence of the feature which is the most
> > >             semantically "relevant" feature for this
> > > sequence. A default
> > >             implementation is provided which for simple cases
> > > returns just
> > >             the sequence, but for split cases, loops over the
> > > split location
> > >             to return the sequence. In the case of split
> > > locations with
> > >             remote locations, eg
> > >
> > >             join(AB000123:5567-5589,80..1144)
> > >
> > >             in the case when a database object is passed in,
> > > it will attempt
> > >             to retrieve the sequence from the database
> > > object, and "Do the right thing",
> > >             however if no database object is provided, it
> > > will generate the correct
> > >             number of N's (DNA) or X's (protein, though this
> > > is unlikely).
> > >             This function is deliberately "magical"
> > > attempting to second guess
> > >             what a user wants as "the" sequence for this feature
> > >
> > >             Implementing classes are free to override this
> > > method with their
> > >             own magic if they have a better idea what the user wants
> > >
> > >   Args    : [optional] A Bio::DB::RandomAccessI compliant object
> > >   Returns : A Bio::Seq
> > >
> > >
> > >
> > >
> > > _______________________________________________
> > > Bioperl-l mailing list
> > > Bioperl-l@bioperl.org
> > > http://bioperl.org/mailman/listinfo/bioperl-l
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l