[Bioperl-l] Bio::SeqFeature->feature_seq
Hilmar Lapp
hlapp@gnf.org
Tue, 10 Sep 2002 12:24:01 -0700
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().
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
>