In Blast+, How Can I Ignore The *** No Hits Found *** In Output
1
0
Entering edit mode
10.3 years ago
commonsnook ▴ 40

Hi,

Doing a blast+, using the default output ( -outfmt 0 ), there is a way to not save all the queries that doesn't hit ?

I want to eliminate from output the lines around No hits found , I think it's not hard to do this using python against the blast+ output, but if the program itself has a native option to do that, it would save a considerable amount of time/processing and space.

Just to be crystal clear, that is the part I want to expunge from output:

Query= FCC1WLUACXX:8:1306:8508:25826#GAACGTGA/1

Length=100


***** No hits found *****



Lambda      K        H
    1.33    0.621     1.12 

Gapped
Lambda      K        H
    1.28    0.460    0.850 

Effective search space used: 8650833807

Thank you all in advance.

blast+ • 5.3k views
ADD COMMENT
1
Entering edit mode

Do you need the standard BLAST output? If not, choose one of the other output formats (e.g. tabular), where only hits are reported. Otherwise, you'll need a parser, which exists in (Bio)Python and many other languages.

ADD REPLY
0
Entering edit mode

i don't know if you can fix that by parameter settings. but you can probably pipe the blast output through a custom utility to cut off the empty output (you can iterate over hits in BioPerl) and then to zip the stream in order to save some space.

ADD REPLY
0
Entering edit mode

That was the solution I ended up using, I reduced my output from 2.8gb to 1.8gb using a python script. Sadly it took a few extra time to process, something like 620 minutes VS 640 minutes.

ADD REPLY
0
Entering edit mode

if you have a huge dataset you may produce both outputs, thedefault one and in a tabular format, you may use tabular one to make analysis and a standard one to see alignments etc

ADD REPLY
0
Entering edit mode

Is it possible to filter the standard BLAST output since then?

ADD REPLY
0
Entering edit mode
10.3 years ago

As far as I know one cannot modify the standard Blast output.

The reasons for it looking the way it is are largely historical but since so many tools rely on parsing this exact format they had to maintain it identical over a decade .

ADD COMMENT

Login before adding your answer.

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