Quantcast
Channel: Post Feed
Viewing all articles
Browse latest Browse all 41826

Error '"use" not allowed' when running a bioperl script

$
0
0

Hello all i would like to blast multiple sequence individually one after another and output i need in excel sheet, i tried like this:

use Bio::Tools::Run::StandAloneBlastPlus;
Bio.SearchIO.BlastIO.blast_xml
use Excel::Writer::XLSX;
use strict;
use Bio::SearchIO;
for file in *.fasta
do
    echo $file
      out=`echo $file | sed 's/_.fasta_/_.excel_/'`
my $factory = Bio::Tools::Run::StandAloneBlastPlus->new(
    -db_data => 'Autotransporters.fasta',  # Specifies the file to use for database
    -create => 1               # Creates a new temporary database
);
my $result = $factory->blastn(
    -query => '$file',                # Specifies the query file
    -outfile => '$out' );  # Specifies the output location
$factory->cleanup;                        # Deletes the temporary database files

 

Error :

"use" not allowed in expression at multifasta_blast.pl line 3, at end of line
syntax error at multifasta_blast.pl line 3, near "blast_xml
use Excel::Writer::XLSX"
BEGIN not safe after errors--compilation aborted at multifasta_blast.pl line 4.

Can anyone help me out to solve the error .

 

 

 


Viewing all articles
Browse latest Browse all 41826

Trending Articles