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

Jay Hannah jay at jays.net
Thu Mar 1 16:15:03 EST 2007

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...)



More information about the Bioperl-l mailing list