The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

XMS::WeightMatrix - Perl module for creating weightmatrices for DNA motifs in XMS format

SYNOPSIS

  use XMS::WeightMatrix;
  my $wm = XMS::Weightmatrix->new(@matrix);   # @matrix is reference to array of arrays
  $wm->toXML();                          # wm is weightmatrix is xms format
  $wm->toString();                       # wm is weightmatrix is string/raw format
  $wm->WeightForSymbol("adenine",rowindex) # Get weight for "adenine" residue at row number rowindex
  $wm->setWeightForSymbol("adenine",rowindex,weight) # Set weight for "adenine" residue at row number rowindex

DESCRIPTION

The WeightMatrix package can be used to create the XMS format for a given position weight matrix. It can also be sued to obtain weights or to set new weights.

METHODS XMS::WeightMatrix provides five methods, new(), toXML(), toString(), WeightForSymbol() and setWeightForSymbol():

$w = XMS::WeightMatrix-new([matrix]);>

new() returns a new String handle.

$x = $w-toXML();>

toXML() converts the array into a XMS format weightmatrix.

$s = $w-toString();>

toString() converts the array into a string format weightmatrix.

$ws = $w-WeightForSymbol([symbol, row number]);> WeightForSymbol allows to get weight for a nucleotide (A,T,G or C) at a particular position in the matrix.

= item $sws = $w-setWeightForSymbol([symbol, rownumber,weight]);> setWeightForSymbol allows to set weight for a nucleotide (A, T, G or C) at a particular position in the matrix.

DEPENDENCIES

This module has external dependencies on the following modules: Exporter XML::Writer, IO::File XML::Reader

EXPORT

Nothing.

SEE ALSO

perl(1), XML::Writer, XML::Reader

AUHTOR

Harpreet Saini, hsaini@ebi.ac.uk

COPYRIGHT AND LICENSE

Copyright (C) 2009 by harpreet saini

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.9 or, at your option, any later version of Perl 5 you may have available.