Bio::EnsEMBL::Analysis::Tools::Pmatch
MergedHit
Toolbar
Package variables
No package variables defined.
Included modules
Inherit
Synopsis
No synopsis!
Description
No description!
Methods
Methods description
Title : add_CoordPair Usage : Function: adds a CoordPair to the supporting data for this MergedHit Example : Returns : Args : |
Title : coverage Usage : Function: get/set for coverage (% of target covered by this hit Example : Returns : Args : |
Title : each_CoordPair Usage : Function: returns the CoordPairs contibuting to this MergedHit Example : Returns : Args : |
Title : new Usage : Function: constructor Example : Returns : Args : |
Title : qend Usage : Function: returns overall end of hit in fpc contig coords Example : Returns : Args : |
Title : qstart Usage : Function: returns overall start of hit in fpc contig coords Example : Returns : Args : |
Title : query Usage : Function: get/set for query (fpccontig name) Example : Returns : Args : |
Title : strand Usage : Function: get/set for (query) strand Example : Returns : Args : |
Title : subsume_MergedHit Usage : Function: Incorporate all the pairs from another MergedHit into this one Example : Returns : Args : |
Title : target Usage : Function: get/set for target (protein name) Example : Returns : Args : |
Title : tend Usage : Function: returns overall end of hit in protein coords Example : Returns : Args : |
Title : tstart Usage : Function: returns overall start of hit in protein coords Example : Returns : Args : |
Methods code
sub add_CoordPair
{ my ($self,$pair) = @_;
$self->throw('No coord pair') unless defined $pair;
$self->throw('$pair is not a Bio::EnsEMBL::Analysis::Tools::Pmatch::CoordPair') unless $pair->isa("Bio::EnsEMBL::Analysis::Tools::Pmatch::CoordPair");
push(@{$self->{_coord_pairs}},$pair);
if ($self->strand == 1) {
@{$self->{_coord_pairs}} = sort {$a->qstart <=> $b->qstart} @{$self->{_coord_pairs}};
}
else {
@{$self->{_coord_pairs}} = sort {$b->qstart <=> $a->qstart} @{$self->{_coord_pairs}};
}
$self->tstart(@{$self->{_coord_pairs}}[0]->tstart);
$self->qstart(@{$self->{_coord_pairs}}[0]->qstart);
$self->tend(@{$self->{_coord_pairs}}[scalar(@{$self->{_coord_pairs}})-1]->tend);
$self->qend(@{$self->{_coord_pairs}}[scalar(@{$self->{_coord_pairs}})-1]->qend); } |
sub coverage
{ my ($self,$arg) = @_;
if ($arg) {
$self->{'coverage'} = $arg;
}
return $self->{'coverage'}; } |
sub each_CoordPair
{ my ($self) = @_;
return @{$self->{_coord_pairs}}; } |
sub new
{ my ($class, @args) = @_;
my $self = bless {}, $class;
my ($query, $target, $strand,$coverage) = rearrange(['QUERY',
'TARGET',
'STRAND',
'COVERAGE'],@args);
$self->throw("No query") unless defined $query;
$self->query($query);
$self->throw("No target") unless defined $target;
$self->target($target);
$self->throw("No strand") unless defined $strand;
$self->strand($strand);
$self->throw("No coverage") unless defined $coverage;
$self->coverage($coverage);
$self->{'_coord_pairs'} = [];
return $self; } |
sub qend
{ my ($self,$arg) = @_;
if ($arg) {
$self->{'qend'} = $arg;
}
return $self->{'qend'};
}
1; } |
sub qstart
{ my ($self,$arg) = @_;
if ($arg) {
$self->{'qstart'} = $arg;
}
return $self->{'qstart'}; } |
sub query
{ my ($self,$arg) = @_;
if ($arg) {
$self->{'query'} = $arg;
}
return $self->{'query'}; } |
sub strand
{ my ($self,$arg) = @_;
if ($arg) {
$self->{'strand'} = $arg;
}
return $self->{'strand'}; } |
sub subsume_MergedHit
{ my ($self,$hit) = @_;
$self->throw('No hit') unless defined $hit;
$self->throw('$hit is not a Bio::EnsEMBL::Analysis::Tools::Pmatch::MergedHit') unless $hit->isa("Bio::EnsEMBL::Analysis::Tools::Pmatch::MergedHit");
push(@{$self->{_coord_pairs}},$hit->each_CoordPair);
if ($self->strand == 1) {
@{$self->{_coord_pairs}} = sort {$a->qstart <=> $b->qstart} @{$self->{_coord_pairs}};
}
else {
@{$self->{_coord_pairs}} = sort {$b->qstart <=> $a->qstart} @{$self->{_coord_pairs}};
}
$self->tstart(@{$self->{_coord_pairs}}[0]->tstart);
$self->qstart(@{$self->{_coord_pairs}}[0]->qstart);
$self->tend(@{$self->{_coord_pairs}}[scalar(@{$self->{_coord_pairs}})-1]->tend);
$self->qend(@{$self->{_coord_pairs}}[scalar(@{$self->{_coord_pairs}})-1]->qend); } |
sub target
{ my ($self,$arg) = @_;
if ($arg) {
$self->{'target'} = $arg;
}
return $self->{'target'}; } |
sub tend
{ my ($self,$arg) = @_;
if ($arg) {
$self->{'tend'} = $arg;
}
return $self->{'tend'}; } |
sub tstart
{ my ($self,$arg) = @_;
if ($arg) {
$self->{'tstart'} = $arg;
}
return $self->{'tstart'}; } |
General documentation
No general documentation available.