Question: tabular blast output file
gravatar for haro
19 months ago by
haro220 wrote:

Hi all!

I'm doing local blasts on contigs and I'm looking for results with a tabular output. I have already tried -outfmt with 6, 7 or 10, playing with different output format options. However I'm looking for something like this (obtained with blastn -query inputContigs.fasta -db nt -task blastn > output.txt) but with tabulation between references/organisms/bits/evalues:

Query= ha-1_denovo_c1    cov=5.25 len=454 gc=23.79

                                                                      Score     E
Sequences producing significant alignments:                          (Bits)  Value

gb|AC270265.1|  Homo sapiens chromosome 8 clone CH17-194A21, comp...  57.2    3e-04
gb|KP249663.1|  Eucommia ulmoides microsatellite EU-IV43S4101EQ75...  57.2    3e-04
ref|XM_010093073.1|  Morus notabilis Ethylene-responsive transcri...  57.2    3e-04
emb|LL711914.1|  Elaeophora elaphi genome assembly E_elaphi ,scaf...  57.2    3e-04

Does anybody knows how to solve my problem?

alignment • 784 views
ADD COMMENTlink modified 18 months ago by • written 19 months ago by haro220
gravatar for Jean-Karim Heriche
19 months ago by
EMBL Heidelberg, Germany
Jean-Karim Heriche16k wrote:

I am not sure I get what you're trying to achieve but it may be that what you're missing is simply the custom formatting option for the tabular output. Have a look at blastn -help. Alternatively, you can try the xml output and reformat it to tabular output using XSLT

Edit: (there was a previous post on this but I can't seem to find it). here is Pierre Lindenbaum's post with his blast2tsv stylesheet.

ADD COMMENTlink modified 19 months ago • written 19 months ago by Jean-Karim Heriche16k

This post A: Blast+ results file parsing to fasta file ?

ADD REPLYlink written 19 months ago by genomax52k

Thanks, just found it again while you were writing.

ADD REPLYlink written 19 months ago by Jean-Karim Heriche16k
gravatar for haro
18 months ago by
haro220 wrote:

Thank you for your answer, it works either with blast2tsv.xsl or!

However, it stops when my file is too big. So I split my files. I was also thinking about filtering my input file, something like grep -e Homo -e Query= file.txt > filt_file.txt It works with my original input file but not with xml. How can I filter such a file?

ADD COMMENTlink written 18 months ago by haro220
gravatar for
18 months ago by
Philadelphia, PA wrote:

You can do -outfmt 6, then on the command-line do cut -f 1,2,11,12 output.txt > output2.txt to get the query, subject, e-val, and bit score columns.

ADD COMMENTlink written 18 months ago by
Please log in to add an answer.


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