None available.
sub map_coordinates
{ my $self = shift;
my @coords;
my $sla = $self->{'_mapper'}->adaptor->db->get_SliceAdaptor;
if ($_[4] eq $self->{'from'}) {
@coords = $self->{'_mapper'}->map(@_[0..3], $self->{'from_cs'});
} elsif ($_[4] eq $self->{'to'}) {
@coords = $self->{'_mapper'}->map(@_[0..3], $self->{'to_cs'});
} else {
throw($_[4].' is neither from/to coordinate system');
}
for my $c ( @coords ) {
$c->id( $sla->fetch_by_seq_region_id($c->id)->seq_region_name ) if ($c->isa('Bio::EnsEMBL::Mapper::Coordinate'));
}
return @coords;
}
1; } |
sub new
{ my ( $proto, $from, $to, $from_cs, $to_cs, $assembly_mapper ) = @_;
my $class = ref $proto || $proto;
my $self = {
'_mapper' => $assembly_mapper,
'from' => $from,
'to' => $to,
'from_cs' => $from_cs,
'to_cs' => $to_cs,
};
bless $self, $class;
return $self; } |