NAME

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

VERSION

Version 0.17

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};

# Returns the motif objects, score and 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

METHODS

new

Create new Mofext object.

Arguments:

1. Bio::DOOP::DBSQL object 2. promoter type (500, 1000, 3000) 3. subset type (depends on reference species) 4. arrayref of cluster ids

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

new_by_file

Create a new Mofext object from query file, containing cluster ids, one per line.

Arguments:

1. Bio::DOOP::DBSQL object 2. promoter type (500, 1000, 3000) 3. subset type (depends on reference species) 4. name of file with cluster ids

$mofext = Bio::DOOP::Util::Run::Mofext->new_by_file($db,500,'B','/tmp/clusters.txt');

new_by_tmp

Create a new Mofext object from an existing temporary file containing conserved motifs. It is useful in some cases, because the new constructor is very slow when you use large cluster lists. If you use this constructor, you don't need to use the set_tmp_file_name and write_to_tmp methods.

Arguments:

1. Bio::DOOP::DBSQL object 2. temporary file name

$mofext = Bio::DOOP::Util::Run::Mofext->new_by_tmp($db,"/tmp/motifs.txt");

get_tmp_file_name

Get the name of the temporary file containing the motifs.

$tmp_name = $mofext->get_tmp_file_name;

set_tmp_file_name

Set the temporary file name.

$mofext->set_tmp_file_name('/tmp/motifs.txt');

write_to_tmp

Write out the collected motifs to the temporary file.

$write_error = $mofext->write_to_tmp;

run

Runs mofext, returns 0 on success, otherwise -1.

Arguments:

1. query sequence 2. wordsize 3. cutoff 4. matrix file path/name

A typical matrix looks like this:

11 A T G C S W R Y K M N A 5 -4 -4 -4 -4 1 1 -4 -4 1 -2 T -4 5 -4 -4 -4 1 -4 1 1 -4 -2 G -4 -4 5 -4 1 -4 1 -4 1 -4 -2 C -4 -4 -4 5 1 -4 -4 1 -4 1 -2 S -4 -4 1 1 -1 -4 -2 -2 -2 -2 -1 W 1 1 -4 -4 -4 -1 -2 -2 -2 -2 -1 R 1 -4 1 -4 -2 -2 -1 -4 -2 -2 -1 Y -4 1 -4 1 -2 -2 -4 -1 -2 -2 -1 K -4 1 1 -4 -2 -2 -2 -2 -1 -4 -1 M 1 -4 -4 1 -2 -2 -2 -2 -4 -1 -1 N -2 -2 -2 -2 -1 -1 -1 -1 -1 -1 -1

$mofext_error = $mofext->run('AAGTKSAAT','7','90','/data/run/matrix.txt')

run_background

Runs mofext in background, returns the process id.

Arguments:

1. query sequence 2. wordsize 3. cutoff 4. matrix file path/name 5. output file path/name

$mofext_pid = $mofext->run_background('AAGTKSAAT','7','90','/data/run/matrix.txt','/data/run/mofext_results.txt');

get_results

Returns an arrayref of arrays with motif objects and other information of the results.

The results contain the following:

1. Bio::DOOP::Motif object 2. motif score 3. motif extended score 4. full hit sequence 5. alignment start position in the query sequence 6. alignment start position in the hit sequence

@result = @{$mofext->get_results};

get_results_from_file

Returns an arrayref of arrays with motif objects and other information of the results from a results file. With this method you can fetch the results of different mofext objects.

The results contain the following:

1. Bio::DOOP::Motif object 2. motif score 3. motif extended score 4. full hit sequence 5. alignment start position in the query sequence 6. alignment start position in the hit sequence

@result = @{$mofext->get_results_from_file};