[Bioperl-l] conservative amino acid change?

Aaron J Mackey Aaron J. Mackey" <amackey@virginia.edu
Mon, 6 Aug 2001 16:21:50 -0400 (EDT)

On Mon, 6 Aug 2001, Heikki Lehvaslaiho wrote:

> Your plan of starting slowly with simpler tasks and then adding more
> complex approaches sounds good.

Right: I'd start with Bio::MatrixI.pm and
Bio::Matrix::SimilarityMatrixI.pm and the methods you proposed.

Then, I'd implement

I suspect that nearly all of these implementations will need to store a
lower-triangular matrix of values (for PAM, the 1, 10 and 100 or some
other mix, for BLOSUM all the available ones we want), either in a file or
via the __DATA__ handle (decision #1).  The persistent storage format
could be triangular or not (decision #2).  Regardless, all of the
implementations could benefit from an IO class that was capable of reading
full or triangular matrices, and an IO class that was capable of writing
out full or triangular matrices.  I'd think that the same class could be
smart enough to figure out triangular or not.

Are you thinking something akin to this: ??

use Bio::MatrixIO;

my $matrixio = new Bio::MatrixIO file => 'pam120.mat';
my $pam120 = $matrixio->read(); # isa SimilarityMatrix, but not a ::PAM
$matrixio->write($pam120, { triangular => 1 }); # default is

Or more like this:

use Bio::Matrix::SimilarityMatrix::PAM;

my $pam120 = new Bio::Matrix::SimilarityMatrix::PAM file => 'pam120.mat';
# pam120 isa SimilarityMatrix::PAM

so that MatrixI needs to provide some simple matrix read/write
functionality that can be used by all it's descendants?

If you want to build the BioPerl sanctified infrastructure here, I'd be
willing to provide some of the guts.


P.S. And yes, let's not think at all about
Bio::Matrix::InstaneousRateMatrix::PAM/WAG/JTT.pm quite yet, but what I
envisioned was something like:

my $pam = new Bio::Matrix::InstaneousRateMatrix::PAM;
my $pam120 = $pam->substitutionmatrix(120);
$pam120->write(file => 'pam120.mat');

or some such.

 o ~   ~   ~   ~   ~   ~  o
/ Aaron J Mackey           \
\  Dr. Pearson Laboratory  /
 \ University of Virginia  \
 /  (434) 924-2821          \
 \  amackey@virginia.edu    /
  o ~   ~   ~   ~   ~   ~  o