Full header in blastn out6 format ??
2
0
Entering edit mode
8.6 years ago
Picasa ▴ 650

Hello,

Is it possible to get the full header in blastn out6 mode when outputing the result ?

For example, my output looks like:

seq1 GBSQ01012201.1.2324 100.0 297 0 0 1 297 1 2324 -1 0

My database:

GBSQ01012201.1.2324 Bacteria;Proteobacteria;Gammaproteobacteria;Pseudomonadales;Moraxellaceae;Penicillium janthinellum AAUCAAGUGCCUUAAGGGUGU ...

I would like an output like this:

seq1 GBSQ01012201.1.2324 Bacteria;Proteobacteria;Gammaproteobacteria;Pseudomonadales;Moraxellaceae;Penicillium janthinellum 100.0 297 0 0 1 297 1 2324 -1 0

blast • 8.5k views
ADD COMMENT
3
Entering edit mode
8.6 years ago

You will have to custom define your tab delimited output to include the "stitle" column. For example:

The default columns for outfmt 6 are:

'qseqid sseqid pident length mismatch gapopen qstart qend sstart send evalue bitscore'

Just add 'stitle' in there. So something like:

-outfmt '6 qseqid sseqid stitle pident length mismatch gapopen qstart qend sstart send evalue bitscore'
ADD COMMENT
0
Entering edit mode

As far as I recall, this only works with 1. NCBI's preformatted BLAST DBs and 2. DBs created from sequence files retrieved from the NCBI when -parse_seqids is used in makeblastdb and the sequence headers follow the gi|acc formatting (so it does not work with e.g. sequences from GenBank assembly dirs).

ADD REPLY
1
Entering edit mode
8.6 years ago
5heikki 11k

If you replace spaces with e.g. underscores, you will see full headers in output. Alternatively, if you create a map file like (id TAB lineage), which you can parse from your headers easily as such:

GBSQ01012201.1.2324    Bacteria;Proteobacteria;Gammaproteobacteria;Pseudomonadales;Moraxellaceae;Penicillium janthinellum
...

You can join the rest of the header to tabular blast output with join, e.g.

join -1 2 -2 1 -t $'\t' -o. 1.1,1,2,1.3,1.4,1.5,1.6,1.7,1.8,1.9,1.10,1.11,1.12,2.2 <(sort -k2,2 -t $'\t' blastOutput) <(sort -k1,1 -t $'\t' mapfile) > blastOutputWithLineageAtCol13
ADD COMMENT
0
Entering edit mode

Thanks, Ill look at it

ADD REPLY

Login before adding your answer.

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