can anyone please give me an example of how to use
HTML::Form module
and its method
@values = $form->param( $name )
thanks alot.
HTML::Form module
and its method
@values = $form->param( $name )
thanks alot.
$seq = $query->param('sequence');
open(VERIFY,"sequence.txt") or die "Can't open sequence.txt: $!";
print VERIFY "'$seq'";
close VERIFY;
local @ARGV = ($seq); do 'ncbi2tcplast.pl';
#!/usr/bin/perl
use CGI;
use strict;
my $infile = "tcresult.bls";
open(INFILE, "$infile") or die "Can't open $infile: $!";
my $query = new CGI;
print STDOUT $query->header();
print STDOUT $query->start_html(-title=>"Response from blast", -BGCOLOR=>"#FFFFFF");
print STDOUT "\n<h1><center><font face=times new roman>Results from the BLAST</font></center></h1>\n";
my $seq = $query->param('sequence');
open(VERIFY,"sequence.txt") or die "Can't open sequence.txt: $!";
print VERIFY "'$seq'";
close VERIFY;
print STDOUT "<pre>";
local @ARGV = ($seq);
do 'ncbi2tcblast.pl';
while(<INFILE>){
print STDOUT $_;
}
print STDOUT "</pre>";
unlink "/path/apache/htdocs";
print STDOUT $query->end_html;
print "\n";
unlink "/path/apache/htdocs";
#!/usr/bin/perl
use strict;
use Bio::Perl;
use Bio::SearchIO;
use Bio::DB::GenPept;
my @s1array;
my $fasta_file=@ARGV[0];
print "Blast in progress...\n";
system ("blastall -p blastp -d ../database/nrpart -i $fasta_file -o repo.bls");
my $in = new Bio::SearchIO(-format => 'blast', -file => 'repo.bls');
while( my $result = $in->next_result ) {
while( my $hit = $result->next_hit ) {
while( my $hsp = $hit->next_hsp ) {
if ( $hsp->evalue <= 0.001 ) {
print "Hit=", $hit->name, "\tDescription=", $hit->description, "\tAccession=", $hit->accession, "\tEvalue=", $hsp->evalue, "\tPercent_id=", $hsp->percent_identity, "\$
push(@s1array, $hit->accession);
}
}
}
}
$string =~ s/[\r\n]//g;
Comment