1
$\begingroup$

I'm trying to compare proteins generated with prokka (from a genome) with blastp using a virulence factor database VFDB, and I want to use some parameters obtained from this paper:

blastp option, top hit, ≥50% identity, ≥50% alignment length, E-value of < 10 - 5

How can I specify those parameters on the command line?

# create DB
makeblastdb -in VFDB.fas -dbtype prot

# run blast
blastp -query my.faa -db VFDB.fas -out results.txt .....

any suggestion?

$\endgroup$
5
$\begingroup$

You can use these options:

blastp -query my.faa -db VFDB.fas \
       -perc_identity 50 -outfmt 6 \
       -evalue 10e-5 -out results.txt

Then select the 5th column, qlen, and the 13th columns, slen, and get the percentage higher than 50.

awk  -F'\t' '{ if ($NF >= 50) printf "%s\t%.2f\n", $0 , ($2/$5)*100 }' result.txt

Check the documentation for the full -outfmt column names with blast -help

$\endgroup$
2
  • $\begingroup$ Thanks so much for the help. one more questions. I use the outfmt 6, and it have the next columns: qseqid, sseqid, pident, length, mismatch, gapopen, qstart, qend, sstart, send, evalue, bitscore. in this case which columns do I have to use to determinate the percent of alignment length? , thanks so much $\endgroup$
    – abraham
    Sep 12 at 6:46
  • 1
    $\begingroup$ you can configure outfmt 6 to produce a custom format, qlen and slen included, check the blastp -help $\endgroup$
    – zorbax
    Sep 13 at 6:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.