can anyone tell me what's wrong with the following script. i can print $fasta_file on the browser, but i get an error saying i can't open the file ( $fasta_file) when it comes to this line:
my $seq_in=Bio::SeqIO->new('-file' => '$fasta_file', '-format' => 'fasta');
Expand|Select|Wrap|Line Numbers
- ##### script ########
- #!/usr/bin/perl -w
- use strict;
- use Bio::Perl;
- use Bio::SearchIO;
- use Bio:B::GenPept;
- use Bio::SearchIO::Writer::HTMLResultWriter;
- use Bio::SeqIO;
- use Bio::Tools::Run::StandAloneBlast;
- use CGI;
- use CGI::Carp qw(fatalsToBrowser);
- use CGI qw(:standard);
- #generate a new CGI object from the input to the CGI script
- my $query = new CGI;
- my @s1array;
- my $fasta_file;
- 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";
- print STDOUT "<br>The contents of the uploaded file:\n<br></b>\n";
- my $fasta_file = $query->param('sequence');
- print STDOUT $fasta_file;
- my $seq_in=Bio::SeqIO->new(
- '-file' => '$fasta_file',
- '-format' => 'fasta'
- );
- my $queryin=$seq_in->next_seq();
- my @params = (
- 'program' => 'blastp',
- 'database' => 'database/nrpart',
- 'outfile' => 'result/repo.bls',
- '_READMETHOD' => $
- my $factory=Bio::Tools::Run::StandAloneBlast->new(@params);
- my $blast_report=$factory->blastall($queryin);
thanks alot