<p>You can use these options:</p>
<pre><code>blastp -query my.faa -db VFDB.fas \
       -perc_identity 50 -outfmt 6 \
       -evalue 10e-5 -out results.txt
</code></pre>
<p>Then select the 5th column, <em>qlen</em>, and the 13th columns, <em>slen</em>, and get the percentage higher than 50.</p>
<pre><code>awk  -F'\t' '{ if (<span class="math-container">$NF &gt;= 50) printf "%s\t%.2f\n", $</span>0 , (<span class="math-container">$2/$</span>5)*100 }' result.txt
</code></pre>
<p>Check the documentation for the full <code>-outfmt</code> column names with <code>blast -help</code></p>

CC BY-SA 4.0
2021-09-12T06:46:28.493Z
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
abraham
CC BY-SA 4.0
2021-09-13T06:59:43.903Z
you can configure outfmt 6 to produce a custom format, *qlen* and *slen* included, check the `blastp -help`
zorbax
CC BY-SA 4.0
2021-09-10T07:59:33.120Z
2021-09-11T12:24:37.607Z
2021-09-11T12:24:37.607Z
zorbax
<p>I'm trying to compare proteins generated with prokka (from a genome) with blastp using a virulence factor database <a href="http://www.mgc.ac.cn/VFs/download.htm" rel="nofollow noreferrer">VFDB</a>, and I want to use some parameters obtained from this <a href="https://journals.asm.org/doi/epdf/10.1128/mBio.02852-18" rel="nofollow noreferrer">paper</a>:</p>
<p><code>blastp option, top hit, ≥50% identity, ≥50% alignment length, E-value of &lt; 10 - 5</code></p>
<p>How can I specify those parameters on the command line?</p>
<pre><code># create DB
makeblastdb -in VFDB.fas -dbtype prot

# run blast
blastp -query my.faa -db VFDB.fas -out results.txt .....
</code></pre>
<p>any suggestion?</p>

<blastp><makeblastdb>
blastp option to compare with a personal database
# blastp option to compare with a personal database

(Asked by: username_0 on 2021-09-10)

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?

**Tags:** blastp, makeblastdb

---

## 1 answers

### Answer by username_1 on 2021-09-10. Score: 5 | Accepted answer

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

> **Comments:**
> **username_0**: 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  
> **username_1**: you can configure outfmt 6 to produce a custom format, *qlen* and *slen* included, check the `blastp -help`  

---

