FW: [Bioperl-l] FW: Help with hmmpfam

Kary Ann Del Carmen Soriano Ocana Kary at ioc.fiocruz.br
Mon Apr 11 06:37:27 EDT 2005

Dear All,
I need run a "php script" and call in it (with system command) other "script in perl/bioperl" for run hmmpfam. I would like (if possible) to obtain some help for execute this script, because recognize only perl script but at the moment of run hmmpfam (bioperl modules), it doesn't run it.
I am listing my code below and the output containing the following error:

(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