I am looking for a command to count the total number of unique proteins in a file. For instance I wrote a command to BLAST XYZ proteins as query against the DLY proteins as a database to determine the number of genes or proteins that are shared between XYZ and DLY:
blastp -query ~/user/XYZ.faa -db DLY -evalue 1e-10 -outfmt '6 qseqid' | sort | uniq | wc -l
I used the -evalue option to provide me with alignments with an e-value that is 10^-10 or lower.
How can I represent my command so that that it can provide me with a proportion of the total proteins in each species (i.e. XYZ and DLY).
Thank you!
grep
with-o
flag and a regex pattern say'\[.*?\]
would get those brakets, as you don't want the square brackets, a lookbehind will probably do, e.g.grep -o "(?<=\[)[^\]]+" -
. However, there are several problems with a species tally of a blast result... $\endgroup$sed
orgrep
are a poor choice. Doing it manually for representative species is actually the easiest solution... $\endgroup$