tabular blast output file
3
0
Entering edit mode
7.9 years ago
vmicrobio ▴ 290

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
nseq=16

Length=454
                                                                      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 • 5.1k views
ADD COMMENT
3
Entering edit mode
7.9 years ago

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 COMMENT
2
Entering edit mode
ADD REPLY
0
Entering edit mode

Thanks, just found it again while you were writing.

ADD REPLY
0
Entering edit mode
7.9 years ago
vmicrobio ▴ 290

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

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 COMMENT
0
Entering edit mode
7.9 years ago
st.ph.n ★ 2.7k

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 COMMENT

Login before adding your answer.

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