How to get blast tabular output
2
1
Entering edit mode
9.1 years ago
jeccy.J ▴ 60

Hi everyone, i am using bioperl to do blast 2 sequence. I need to output as a tabular format. I saw some post where they mention we need to use -m8 to get tabular output. But in my code its not working. Can anyone help me out what i am missing in this code.

use Bio::Tools::Run::StandAloneBlastPlus;
#use Excel::Writer::XLSX;
use strict;
use Bio::SearchIO;

my $factory = Bio::Tools::Run::StandAloneBlastPlus->new(
    -db_data =>'test.fasta', # Specifies the file to use for database
    -create =>1 # Creates a new temporary database
    );
my $result = $factory->blastn(
    -query =>'H1.fasta', # Specifies the query file
    -outfmt => -m8,
    -outfile =>'out_H1' # Specifies the output location
    ); 
$factory->cleanup; # Deletes the temporary database files

blast • 3.5k views
ADD COMMENT
2
Entering edit mode
9.1 years ago
5heikki 11k

-m 8 is for pre-blast+ (legacy blast), in your code you seem to be using blast+ so -outfmt 6 is the correct flag for tabular output.

ADD COMMENT
1
Entering edit mode
9.1 years ago

As far as I remember the -outfmt 6 stands for tabular output. See Blast - Formatting Output

ADD COMMENT
1
Entering edit mode

@mikhail You can write this as answer not a comment ;)

ADD REPLY
1
Entering edit mode

Well I have not checked this code actually ("my code its not working"), so I don't know if the OP has any other issues and just wrote a quick suggestion :)

ADD REPLY
1
Entering edit mode

@mikhail... After I answered the OP question , I realized it was exactly like yours ... So, I deleted it after posting although I'm almost sure it's the correct answer !!

Good luck with up voted answers ;)

ADD REPLY

Login before adding your answer.

Traffic: 1889 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6