This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How can I get 100 percent identity and coverage when I run blastp?

Hi Biostars,

I would like to get outputs with 100 percent identity and coverage in blastp. This is my command

blastp -task blastp-short -query infile.fa  -db database.fa -out outfile.txt -outfmt 6

Thank you

alignment

Do you want 100% identity and coverage (i.e. global search) or do you want to use BLAST (i.e. local search)?

Both will be fine, all I want is to get only protein hits that has 100 percent identity to the querry from the blastp

Ah, the classic or vs xor confusion - you cannot have both. Pick one.

Ok, I want to use blastp (i.e local search). Thanks

1 answer

It may exist an easiest way to do it, but here is how i do:

replace the last arg (-output) of your command by this:

-outfmt '6 qseqid sseqid pident length mismatch gapopen qstart qend sstart send evalue bitscore qcovs qcovhsp'

And then with some kind of text manning tool, filter by pident and qcov:

awk '$3 == 100 && $13 == 100 {print}' outfile.txt > filtered_outfile.txt

Be aware of multiple hits for the same query, choose the ones that have the best evalue and bitscore.

Thanks @hugo.avila works perfectly

Log in to answer this question.