This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Identity Cutoff In Blast Output

I was wondering if there is any easy way to do an identity cutoff (e.g. Sequences down to 95% Id) from the blast output locally .I had a look at blastall usage options but haven't seen any flag (or parameter) to do it. There is e-value cutoff option but not %id or score. I have a perl script to do this cut off in the blast output but the script is huge almost 50-60 lines so trying to avoid that and want to use an easy script if any of you got any.

blast

Parsing using Bio::SearchIO from Bioperl would get you down to ~ 10 lines of code.

1 answer

I think, I can do it this way: once I got the normal blast output then I can filter it.

awk '{OFS="\t"; if($%id_column_number>desired cutoff%)print$column_numbers_I_want_with_commas}' blast_output.file >> output

For example:

awk '{OFS="\t"; if($3>95%)print$1,$4,$5,$8}' blast_output.file >> output

Log in to answer this question.