[Bioperl-l] FW: Help with hmmpfam
Marc Logghe
Marc.Logghe at devgen.com
Mon Apr 11 07:42:12 EDT 2005
Hi Kary,
As far as I understood it correctly, you never get to the line 'print "search and run: $search\n";', meaning your perl script crashes earlier, when you envoke $factory->run.
Could you send the error message when you run the perl script from the command line, not via the php script ?
Cheers,
Marc
> 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
>
> ************
>
> Script:
>
> 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 '
> </pre>
> <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(
> query_name
> hit_name
> score
> expect
> query_description
> )] ); my
> $out = Bio::SearchIO->new( -writer => $writer,
> -file => ">searchio.out" );
> while (my $result = $search->next_result()) {
> $out->write_result($result);
> }
> print "fin";
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
>
>
More information about the Bioperl-l
mailing list