[Bioperl-l] Bio::Tools::Glimmer and genes wrapping around the origin

Adam Witney awitney at sgul.ac.uk
Thu Mar 8 11:39:34 EST 2012


Hi,

I have been using Bio::Tools::Glimmer and have come across a problem with it not handling genes that wraparound across the origin. I think I have boiled it down to this test case of what happens internally with Bio::Tools::Glimmer

##############################################################
#! /usr/local/bin/perl -w

use strict;
use warnings;

use Bio::Factory::FTLocationFactory;
use Bio::SeqFeature::Generic;

my $location_string = 'join(117..1,135690..135187)';

my $location_factory = Bio::Factory::FTLocationFactory->new();
my $location_object = $location_factory->from_string($location_string);

print "Location: ".$location_object->to_FTstring."\n";

my $gene = Bio::SeqFeature::Generic->new(
                 '-seq_id'      => 'Testing',
                 '-location'   => $location_object,
                 '-strand'     => -1
             );

print "Location: ".$location_object->to_FTstring."\n";

##############################################################

$ perl ../FTLocationTest.pl 
Location: complement(join(135187..135690,1..117))
Location: complement(join(1..117,135187..135690))

This happens because by setting the '-strand' in Bio::SeqFeature::Generic, this calls the strand method in $location_object (Bio::Location::Split) which then causes the problem (although I can't quite work out where...!

Is this intended behaviour?

Thanks

Adam


More information about the Bioperl-l mailing list