BLAST: blastn/tblastx/blastp/tblastn/blastx
if you need only one best hit for each query, use -num_alignments and -num_descriptions flag as fallows.
Usage:
blastn -query fasta.file -db database_name -outfmt 6 -num_alignments 1 -num_descriptions 1 -out output_file
Example:
blastn -query fasta.file -db nr -outfmt 6 -num_alignments 1 -num_descriptions 1 -out haktan.txt -dust no -task blastn
Output:
tabular form of blast output written in haktan.txt file
Enjoy!
please suggest me command of protein database… and how to blast nucleotide aginst protein database in blastx..
I think you should be able to use similar arguments with blastx. Have you tried running this
blastx -query fasta.file -db nr -outfmt 6 -num_alignments 1 -num_descriptions 1 -out haktan.txt -dust no
And here is the document I find it very useful https://www.ncbi.nlm.nih.gov/books/NBK279675/
How the -db nr look like?
Is it a folder containing all my fasta files that I want to align with my query?
Thank you very much in advance for your answer
Best
No it is a makeblastdb output, see here https://www.haktansuren.com/blast-makeblastdb/