[Bioperl-l] Enhance Bio::PrimarySeqI::trunc() for Bio::Location::Split ?

Chris Fields cjfields at uiuc.edu
Thu Mar 1 16:29:18 EST 2007


On Mar 1, 2007, at 3:15 PM, Jay Hannah wrote:

> On Thu, 1 Mar 2007, Chris Fields wrote:
>> Have you tried using $feature->spliced_seq() instead of seq()?  Using
>> seq() retrieves the full sequence for the split location (from start
>> of first sublocation to end of last), while spliced_seq() splices the
>> sublocation sequences together, which is what I think you want.
>
> Genius. No wonder they promoted you into the core developer group. :)
>
> Using this:
>    my ($nucleotide_seq) = $feat->spliced_seq(-nosort => 1)->seq;
>
> Gives me what I expected against these:
>
> # M37762 CDS 76..819
> # L26462 CDS join(866..957,1088..1310,2161..2289)
> # M12730 CDS join(1959..2355,1..92)
>
> I'm happy to submit my patches for t/genbank.t and t/data/ 
> test.genbank if
> that would make the universe a slightly better place. (...or
> t/SeqFeature.t or t/splicedseq.t, which appear to be the tests that  
> have
> spliced_seq calls in them so far...)
>
> Thanks!
>
> j
> seqlab.net
> http://www.bioperl.org/wiki/User:Jhannah

The more the merrier tests the better, I say.  I would only put in  
one example, though (maybe the last one, M12730, since it's from a  
gene in a circular sequence split across the start).

I'm still planning on testing out some variations of  
Bio::Location::SplitLocationI (which impacts sliced_seq() ) and have  
started a page on it, so any added tests would be great.

chris


More information about the Bioperl-l mailing list