Multiple Blast Output Formats From 1 Blast Run
2
10
Entering edit mode
13.1 years ago
Lorddoskias ▴ 160

Is it possible to generate 2 different output formats (tabular and the default one) by running blastn just once or I have to either

  • 1) Run it 2 times - one for each desired output

  • 2) Generate the tabular one from the default one

blast ncbi output format • 9.5k views
ADD COMMENT
11
Entering edit mode
13.1 years ago

NCBI does already have a command-line application to interconvert BLAST result formats: blast_formatter. You can use the -help flag for more information, or look at the manual.

The general idea is:

  • run your BLAST search with -outfmt 11
  • use the blast_formatter to convert to your desired format

See also the cookbook entry in the below quote for an example.

This application formats both local and remote BLAST results. An RID is required to format remote BLAST results. The RID may be obtained either from a search submitted to the NCBI BLAST web page or by using the –remote switch with one of the applications mentioned above. The blast_formatter accepts the BLAST archive format for stand-alone formatting. The BLAST archive format can be produced by using “-outfmt 11” argument with the stand-alone applications. For an example of how to use this application, please see its cookbook entry.

4.6.13.1 rid: BLAST RID of the report to be formatted.

4.6.13.2 archive: File produced by BLAST application using –outfmt 11

ADD COMMENT
1
Entering edit mode

Try using the newest BLAST+ version.

ADD REPLY
0
Entering edit mode

Blastn says that 11 is out of range. Also by looking at blast_formatter options it seems it is able to change format only fore remote blast alignments since it is expecting a RID and I never saw an option for an input file?

ADD REPLY
1
Entering edit mode
13.1 years ago

You could only use the XML format and transform it later to whatever you want using XSLT. For example, see this previous question on Biostar where the XML format was transformed to the native format for BLAST:

Blast Stylesheet

see also

A: Tools Parsing Ncbi Blast -M 7 Xml Output Format?

ADD COMMENT
0
Entering edit mode

I tried your XSLT sheet in order to convert XML blast output to tabular format but I get erroneous results - all entries have in the resulting file have the same information as the first entry in the XML file. But this repetition is not present in the XML file

ADD REPLY
0
Entering edit mode

The reason I need the tabular one is because I want to generate report with Krona (http://sourceforge.net/p/krona/home/krona/) and it turned out that some numbers which I see in a tabular file produced by Blast are absent in the XML output for the same file.

ADD REPLY

Login before adding your answer.

Traffic: 2085 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