sub add_ContigHit
{ my ($self,$hit) = @_;
$self->throw('No contig hit') unless defined $hit;
$self->throw('$contig is not a Bio::EnsEMBL::Analysis::Tools::Pmatch::ContigHit') unless $hit->isa("Bio::EnsEMBL::Analysis::Tools::Pmatch::ContigHit");
$self->{_contig_hits}{$hit->id()} = $hit; } |
sub get_ContigHit
{ my ($self,$contig) = @_;
return ($self->{_contig_hits}{$contig}) if defined $contig;
return undef;
}
1; } |
sub id
{ my ($self,$id) = @_;
if ($id) {
$self->{'id'} = $id;
}
return $self->{'id'}; } |
sub new
{ my ($class, @args) = @_;
my $self = bless {}, $class;
my ($id) = $self->_rearrange(['ID'], @args);
$self->throw("No id") unless defined $id;
$self->id($id);
return $self; } |