[Bioperl-l] "500 Cannot connect to ----------- (Bad Host name)"
Prem
premkrishnanbv at gmail.com
Fri Jun 18 05:14:27 UTC 2010
Dear friends
We urgently need somebody's help to solve a problem in Bioperl.
We are actually trying to develop an online tool for sequence analysis in
linux pltaform (RedHat).
The first part of the program is to retrieve sequences from ncbi.nlm.nih.gov
.
We wrote code for that.
We are using redhat linux.
We can run the program successfully through terminal.
It creates a fasta file of the retrieved sequences and prints the count of
the sequences.
Now the problem is, when we try to run it in the browser using cgi perl its
not working.
When we checked the error_log it says something like this,
"500 Cannot connect to ----------- (Bad Host name)"
We have given full file permission using chmod 777 *.
File is in the directory cgi-bin.
We are using Apache/2.2.3(redhat).
We try to call this perl script as a submit button action (online submission
form).
Here we are pasting the code for your kind consideration.
Kindly help us...
--------------------------------------------------------------------------------------
*newtest.cgi* - sequence retrieval program
--------------------------------------------------------------------------------------
#!/usr/bin/perl
print "Content-Type: text/html\n\n";
use Bio::Perl;
use Bio::DB::GenBank;
use Bio::DB::Query::GenBank;
my $db = Bio::DB::GenBank->new();
my $query = Bio::DB::Query::GenBank->new
(-db => 'nucleotide',
-query => "Cocos nucifera[Organism]");
my $count = $query->count;
my $stream = $db->get_Stream_by_query($query);
while( my $seq = $stream->next_seq )
{
write_sequence(">>Cocos_nucifera.fasta",'fasta',$seq);
}
print $count;
--------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------
*test.html* - sample html page
--------------------------------------------------------------------------------------
<html>
<body>
<table border=1 width=100% height=450>
<tr>
<td> </td>
</tr>
<tr>
<td height="100">
<form action="/cgi-bin/newtest.cgi" method="get">
<table border="1" width="100%" height="450">
<tr>
<td height="20" valign="middle"><font size="5"
color="green">Scientific name</font></td>
</tr>
<tr>
<td><input type="text" name="txt_scientificname" maxlength="150"
size="30"><font size="2" color="blue">
(eg. <i>Homo sapiens</i> for human, <i>Cocos nucifera</i> for
coconut etc.)</font></td>
</tr>
<tr>
<td><input type="submit" name="submit" value=Search ></td>
</tr>
</table>
</form>
</td>
<tr>
<td> </td>
</tr>
</table>
</body>
</html>
--------------------------------------------------------------------------------------
regards
Prem krishnan B V
Centre for Bioinformatics
University of Kerala
Kariavattom Campus
Thiruvananthapuram
More information about the Bioperl-l
mailing list