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?
I wonder why OP is looking to import BLAST results into Excel though. Wouldn't R be a much MUCH better alternative? I'd personally prefer a simple plain text TSV myself.
I'm not sure what the goal is, but I don't think reading blast in R is any better than Excel because both will use lots of memory and cause problems with large files (unless using scan() or something similar in R, but that will still be slower than unix tools).
I agree. Like I said, I'd personally use shell builtins.
My goal is : i have multiple genome in one folder , now i want blast one after another with specific query sequence.
Could you please help me out.