Bio::Matrix::PSM::IO psiblast
SummaryIncluded librariesPackage variablesSynopsisDescriptionGeneral documentationMethods
Toolbar
WebCvs
Summary
Bio::Matrix::PSM::IO::psiblast - PSM psiblast parser
Package variables
No package variables defined.
Included modules
Bio::Matrix::PSM::ProtMatrix
Bio::Matrix::PSM::Psm
strict
Inherit
Bio::Matrix::PSM::IO Bio::Matrix::PSM::PsmHeader
Synopsis
See Bio::Matrix::PSM::IO for documentation
Description
Parser for ASCII matrices from PSI-BLAST (blastpgp program in
BLAST distribution).
Methods
newDescriptionCode
next_psmDescriptionCode
DESTROY
No description
Code
Methods description
newcode    nextTop
 Title   : new
Usage : my $psmIO = Bio::Matrix::PSM::IO->new(-format=>'psiblast',
-file=>$file);
Function: Associates a file with the appropriate parser
Throws :
Example :
Args :
Returns : Bio::Matrix::PSM::ProtMatrix->new(@args);
next_psmcodeprevnextTop
 Title   : next_psm
Usage : my $psm = $psmIO->next_psm();
Function: Reads the next PSM from the input file, associated with this object
Throws : None
Returns : Bio::Matrix::PSM::ProtPsm object
Args : none
Methods code
newdescriptionprevnextTop
sub new {
   my ($class,@args)=@_;
   my $line;

   my $self   = $class->SUPER::new(@args);
   my ($file) = $self->_rearrange(['FILE'], @args);
   $self->_initialize_io(@args) || warn "Did you intend to use STDIN?"; # Read only for now
$self->_initialize; $self->{_ordered_alphabet} =\@ ordered_alphabet; return $self;
}
next_psmdescriptionprevnextTop
sub next_psm {
   my $self = shift;
   my $line;

   return if ($self->{_end});

   my %args;
   my @ordered_alphabet = @{$self->{_ordered_alphabet}};

   while ( defined( $line = $self->_readline) ) {
      # remove leading and trailing whitespace
chomp $line; $line =~ s/^\s+//g; $line =~ s/\s+$//g; if ( $line =~ /^(\d+)\s+(\w{1})/ ) { # match reference aa and position number
my @elements = split /\s+/, $line; my $position = shift @elements; my $letter = shift @elements; my $ratio = pop @elements; my $ic = pop @elements; # put the next 20 elements into the correct array in %args
for ( 0 .. 19 ) { push @{$args{'l'.$ordered_alphabet[$_]}}, shift @elements; } for ( 0 .. 19 ) { push @{$args{'p'.$ordered_alphabet[$_]}}, shift @elements; } push @{$args{'ic'}}, $ic; } } $self->{_end} = 1; # psiblast matrix files currently only hold one PSM per file
my $psm = Bio::Matrix::PSM::ProtMatrix->new( %args ); return $psm;
}
DESTROYdescriptionprevnextTop
sub DESTROY {
   my $self=shift;
   $self->close;
}

1;
}
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 one
of the Bioperl mailing lists. Your participation is much appreciated.
  bioperl-l@bioperl.org                  - General discussion
http://bioperl.org/wiki/Mailing_lists - About the mailing lists
Support Top
Please direct usage questions or support issues to the mailing list:
bioperl-l@bioperl.org
rather than to the module maintainer directly. Many experienced and
reponsive experts will be able look at the problem and quickly
address it. Please include a thorough description of the problem
with code and data examples if at all possible.
Reporting BugsTop
Report bugs to the Bioperl bug tracking system to help us keep track
the bugs and their resolution. Bug reports can be submitted via the
web:
  https://redmine.open-bio.org/projects/bioperl/
AUTHOR - James ThompsonTop
Email tex@biosysadmin.com
APPENDIXTop