[Bioperl-l] FW: Help with hmmpfam

Kary Ann Del Carmen Soriano Ocana Kary at ioc.fiocruz.br
Wed Apr 6 13:42:59 EDT 2005

Dear All,

I am working with a web design, in this, runs a "php script" that capture two information in two string (one a query sequence, another hmms model from one database) and in this I need to run hmmpfam of a "script in perl". I would like (if possible) to obtain some help with the execute this script "in perl" by system command from a "php script". I am listing my code below and the output containing the following error (It doesn't run the perl script):

(partial) output and error:
aceita a descriço dos modulos
lee a base de dados
factory: Bio::Tools::Run::Hmmpfam=HASH(0x8be2d44)

Última linha da saída: factory: Bio::Tools::Run::Hmmpfam=HASH(0x8be2d44) Valor de Retorno: 2

I put some "print" commands everywhere to see where I am getting the error and looks like it is not entering/printing the while results (eg: factory, search). Any help would be greatly appreciated.

Thanks, Kary



 1.- php:
echo '<pre>';

// Mostra todo o resultado do comando do shell 'perl', e retorna
// a última linha da saída em $last_line. Guarda o valor de retorno
// do comando shell em $retval.
$last_line = system('/usr/bin/perl test_1.pl', $retval);
// Mostrando informação adicional
echo '
<hr />Última linha da saída: '.$last_line.'
<hr />Valor de Retorno: '.$retval
 2.- perl:
$ENV{HMMPFAMDIR} = '/usr/local/bin/hmmpfam';
use lib "/usr/local/bioperl14";
use lib "/usr/local/bioperl-run-1.4";

use strict;
use Bio::Tools::Run::Hmmpfam;
use Bio::SearchIO;
use Bio::SearchIO::Writer::HTMLResultWriter;
use Bio::SearchIO::Writer::TextResultWriter;
use Bio::SearchIO::Writer::HSPTableWriter;
use Bio::SearchIO::Writer::ResultTableWriter;
use Bio::SeqIO;
    print "aceita a descriço dos modulos\n";
my @params = ('DB' => '/home/kary/public_html/MGE-Tryp_Mobile_Genetic_Elements_14_01_05/meus_modelos_hmms.hmm', 'E' => 0.0001);
    print "lee a base de dados\n";
my $factory = Bio::Tools::Run::Hmmpfam->new(@params);
    print "factory: $factory";
#any old protein fasta file
my $search = $factory->run('/home/kary/public_html/MGE-Tryp_Mobile_Genetic_Elements_14_01_05/sequencia_fasta_1_tn.txt');
    print "search and run: $search\n";
my $writer = Bio::SearchIO::Writer::HSPTableWriter->new(
                                        -columns => [qw(
                                                  )]  );
my $out = Bio::SearchIO->new( -writer => $writer,
                              -file   => ">searchio.out" );
while (my $result = $search->next_result()) {
print "fin";

More information about the Bioperl-l mailing list