Bio::Search::HSP PSLHSP
SummaryIncluded librariesPackage variablesSynopsisDescriptionGeneral documentationMethods
Summary
Bio::Search::HSP::PSLHSP - A HSP for PSL output
Package variables
No package variables defined.
Included modules
Bio::Search::HSP::GenericHSP
Inherit
Bio::Search::HSP::GenericHSP
Synopsis
  # get a PSLHSP somehow (SearchIO::psl)
Description
This is a HSP for PSL output so we can handle seq_inds differently.
Methods
newDescriptionCode
gap_blocksDescriptionCode
mismatchesDescriptionCode
Methods description
newcode    nextTop
 Title   : new
 Usage   : my $obj = new Bio::Search::HSP::PSLHSP();
 Function: Builds a new Bio::Search::HSP::PSLHSP object 
 Returns : an instance of Bio::Search::HSP::PSLHSP
 Args    : -gapblocks => arrayref of gap locations which are [start,length]
                         of gaps
gap_blockscodeprevnextTop
 Title   : gap_blocks
 Usage   : $obj->gap_blocks($seqtype,$blocks)
 Function: Get/Set the gap blocks
 Returns : value of gap_blocks (a scalar)
 Args    : sequence type - 'query' or 'hit'
           blocks - arrayref of block start,length
mismatchescodeprevnextTop
 Title   : mismatches
 Usage   : $obj->mismatches($newval)
 Function: Get/Set the number of mismatches
 Returns : value of mismatches (a scalar)
 Args    : on set, new value (a scalar or undef, optional)
Methods code
newdescriptionprevnextTop
sub new {
     my ($class,@args) = @_;
    my $self = $class->SUPER::new(@args);
    my ($qgaplocs,
	$hgaplocs,
	$mismatches) = $self->_rearrange([qw(QUERY_GAPBLOCKS
					     HIT_GAPBLOCKS
					     MISMATCHES)],
				       @args);
    $self->gap_blocks('query',$qgaplocs) if defined $qgaplocs;
    $self->gap_blocks('hit',  $hgaplocs) if defined $hgaplocs;
    $self->mismatches($mismatches) if defined $mismatches;
    return $self;
}
gap_blocksdescriptionprevnextTop
sub gap_blocks {
    my ($self,$seqtype,$blocks) = @_;
    if( ! defined $seqtype ) { $seqtype = 'query' }
    $seqtype = lc($seqtype);
    $seqtype = 'hit' if $seqtype eq 'sbjct';
    if( $seqtype !~ /query|hit/i ) { 
	$self->warn("Expect either 'query' or 'hit' as argument 1 for gap_blocks");
    }

    unless( defined $blocks ) {
	return $self->{'_gap_blocks'}->{$seqtype};
    } else { 
	return $self->{'_gap_blocks'}->{$seqtype} = $blocks;
    }
}
mismatchesdescriptionprevnextTop
sub mismatches {
    my $self = shift;
    return $self->{'mismatches'} = shift if @_;
    return $self->{'mismatches'};
}
General documentation
FEEDBACKTop
Mailing ListsTop
User feedback is an integral part of the evolution of this and other
Bioperl modules. Send your comments and suggestions preferably to
the Bioperl mailing list. Your participation is much appreciated.
  bioperl-l@bioperl.org              - General discussion
  http://bioperl.org/MailList.shtml  - About the mailing lists
Reporting BugsTop
Report bugs to the Bioperl bug tracking system to help us keep track
of the bugs and their resolution. Bug reports can be submitted via
the web:
  http://bugzilla.bioperl.org/
AUTHOR - Jason StajichTop
Email jason-at-bioperl-dot-org
Describe contact details here
CONTRIBUTORSTop
Additional contributors names and emails here
APPENDIXTop
The rest of the documentation details each of the object methods.
Internal methods are usually preceded with a _