NAME

Bio::DOOP::Util::Run::Mofext - Mofext runner module.

VERSION

Version 0.16

SYNOPSIS

#!/usr/bin/perl -w

use Bio::DOOP::DOOP $db = Bio::DOOP::DBSQL->connect("user","pass","doop-plant-1_5","localhost");

@list = ("81001020","81001110","81001200","81001225","81001230","81001290","81001470","81001580","81001610","81001620","81001680","81001680","81001690");

$mofext = Bio::DOOP::Util::Run::Mofext->new($db,'500','M',\@list);

$mofext->set_tmp_file_name("/data/DOOP/dummy.txt");

print $mofext->get_tmp_file_name,"\n";

$error = $mofext->write_to_tmp;

if($error != 0){ die "Write error!\n"; }

$error = $mofext->run('TTGGGC' , 6 , 0.6 , '/data/default_matrix' );

if ($error == -1){ die "No results or error!\n"; }

@res = @{$mofext->get_results}; # Return the motif objects and the score, extended score. for $result (@res){ print $$result[0]->get_id," ",$$result[1],"$$result[2]","\n"; }

DESCRIPTION

Mofext is a fuzzy sequence pattern search tool developed by Tibor Nagy. This module 
is a wrapper object for mofext. It allows the user to search for similar motifs in the 
DOOP database.

AUTHORS

Tibor Nagy, Godollo, Hungary and Endre Sebestyen, Martonvasar, Hungary

SUBRUTINES

new

Create a new Mofext object.
Arguments: DBSQL object, promoter type (500,1000,3000), subset type (B,M,E,V in plants) arrayref of cluster ids.

new_by_file

Create a new Mofext object from a file.
Arguments: DBSQL object, promoter type (500, 1000, 3000), subset type (B,M,E,V in plants), name of the file with cluster ids.

new_by_tmp

Create a new Mofext object from a existing tmp file. It is useful when you have a tmp file, and you want 
to use it over and over, or your tmp file is large (the new constructor is very slow when you use
large cluster lists). If you use this constructor, you don't need to use set_tmp_file_name and write_to_tmp.
Arguments: Bio::DOOP::DBSQL object, temporary file name.
Return type: none
Example:

use Bio::DOOP::DOOP
$db      = Bio::DOOP::DBSQL->connect("username","pswd","doop-chordate-1_4","localhost");

$mofext = Bio::DOOP::Util::Run::Mofext->new_by_tmp($db,"/adatok/prg/perl/DOOP/ize.txt");
$ret = $mofext->run('GGATCCTGGAT',10,0.95,'default_matrix.txt');
@res = @{$mofext->get_results};

for $res (@res){
  print $$res[0]->get_id," ",$$res[1],"\n";
}

get_tmp_file_name

Get the temporary file name.
Return type: string

set_tmp_file_name

Set the temporary file name.
Arguments: temporary file name
Return type: none

write_to_tmp

Write out the collected motifs to the temporary file.
Return type: 0 -> success, -1 -> error

run

Run mofext on temporary file, containing motifs.
Arguments: query sequence, wordsize, cutoff, matrix file path.
Return type: 0 -> success, -1 -> no result or error

run_background

Run mofext, but do not wait for it to finish.
Arguments: query sequence, wordsize, cutoff, matrix file path, output file name.
Return type: the process id

get_results

Returns the arrayref of array of motif objects and score, extended score, full hit sequence,
alignment start position in the query sequence, alignment start position in the hit sequence.

get_results_from_file

Returns the arrayref of the array of motif objects and anything else like the get_results
method  or -1 in the case of an error.
This is a very uniq method because it does not depend on the object. So you can fetch
different results of different mofext objects.