Question: How to get blast tabular output
1
gravatar for jeccy.J
2.8 years ago by
jeccy.J50
Argentinia
jeccy.J50 wrote:

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 • 1.2k views
ADD COMMENTlink modified 19 months ago by Ram13k • written 2.8 years ago by jeccy.J50
2
gravatar for 5heikki
2.8 years ago by
5heikki7.0k
Finland
5heikki7.0k wrote:

-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 COMMENTlink modified 2.8 years ago • written 2.8 years ago by 5heikki7.0k
1
gravatar for mikhail.shugay
2.8 years ago by
mikhail.shugay3.2k
Czech Republic, Brno, CEITEC
mikhail.shugay3.2k wrote:

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

ADD COMMENTlink modified 2.8 years ago • written 2.8 years ago by mikhail.shugay3.2k
1

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

 
 
 
ADD REPLYlink written 2.8 years ago by Bara'a210
1

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 REPLYlink written 2.8 years ago by mikhail.shugay3.2k
1

@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 REPLYlink modified 2.8 years ago • written 2.8 years ago by Bara'a210
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1698 users visited in the last hour