local blast #
with blastdb: #
- make the blastdb:
1makeblastdb -in /path/to/input.fasta \ 2-parse_seqids -blastdb_version 5 \ 3-title "some title or name" -dbtype nucl 4# for peptide fasta use -dbtype prot - run blast:
1blastn -num_threads 5 -outfmt 6 \ 2-query /path/to/query.fasta \ 3-db /path/to/input.fasta > output.filename 4# use blastp for protein FASTAs - note that the same FASTA file is given as the db as was for the database creation command, there should be additional files in the directory where this file is located
- I use these blast commands from the Ubuntu apt package “ncbi-blast+/jammy,now 2.12.0+ds-3build1 amd64”
- more sources about blast: BLAST® Command Line Applications User Manual
blastx and tblastn: #
- its always
-queryagainst db:1blastx: nucl against prot db 2tblastn: prot against nucl db
without db: #
- one command to blast two fasta files against each other:
1blastn -query random.fasta -subject q.fasta --outfmt 6 2# the rest is the same as with a db, just replace db with -subject