MOODS - Perl extension for finding significant matches of position weight matrices.
Title : search
Usage : @results = MOODS::search(seq => Bio::Seq(..), -matrix =>[[1,0],[0,1]] -threshold => 0.1)
Function: Finds position weight matrix matches in dna sequence.
Returns : An array of references to result arrays. There are one result array
corresponding to each matrix. (matrix1_results, matrix2_results,..)
Each result array is a list of positions and scores like:
(pos1, score1, pos2, score2 ...)
Args :
Obligatory
-seq BioPerl sequence object
-matrix or -matrices
You can give one or multiple matrices. One matrix is represented
as a typical perl multidimensional array: a reference to array of
references to arrays of numbers.
-threshold or -thresholds
One threshold is ok for as many matrices as you want, but you
can give different threshold for each matrix.
Optional
-algorithm You can switch search algorithm (Doesn't change results)
"naive" naive algorithm
"pla" permutated lookahead algorithm
"supera" super alphabet algorithm.
- Good for long matrices (> 20)
"lf" lookahead filtration algorithm.
- Default algorithm in most cases.
- Sequence can be searched with multiple matrices
simultaneously.
- You should use this when you have large amount of matrices.
-q You can optionally give a parameter for algorithm (Doesn't
change results)
-combine If you use lookahead filtration algorithm and don't wan't
to use multiple matrix simultaneous search, you can spesify
this parameter to 0. (usually slows down)
-absolute_threshold 1 if threshold is given as an absolute value.
-buffer_size
-bg Background distribution - an array of four doubles. By default
the background is calclulated from sequence.
-flatbg 1 if background distribution is not calculated from
the sequence.
use Bio::Perl;
use Bio::Seq;
use MOODS;
use MOODS::Tools qw(printResults);
#we need a position weight matrix
my $matrix = [ [10,0,0],
[0,10,0],
[0,0,10],
[10,10,10]];
#we need also a bioperl sequence object
my $seq = Bio::Seq->new(-seq => 'actgtggggacgtcagtagcaggcatag',
-alphabet => 'dna' );
my @results = MOODS::search(-seq => $seq, -matrix => $matrix, -threshold => 0.3);
printResults($results[0]);
BioPerl documentation.
Petri J Martinmaki, <pmartinm@>
Copyright (C) 2009 by Petri J Martinmaki
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/