Bio::EnsEMBL::ExternalData::DAS GenomicMapper
Package variablesGeneral documentationMethods
Toolbar
WebCvsRaw content
Package variables
No package variables defined.
Synopsis
No synopsis!
Description
No description!
Methods
map_coordinates
No description
Code
new
No description
Code
Methods description
None available.
Methods code
map_coordinatesdescriptionprevnextTop
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;
}
newdescriptionprevnextTop
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;
}
General documentation
No general documentation available.