• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

blastn: command not found

by admin

blastn is a command-line tool in Linux that is part of the BLAST (Basic Local Alignment Search Tool) suite of tools for searching and comparing sequence databases. It is used to perform nucleotide-nucleotide searches, which involve comparing a query nucleotide sequence to a database of nucleotide sequences to find similar or related sequences.

blastn is commonly used in bioinformatics and molecular biology to identify homologous or related sequences in genomic or transcriptomic data, or to search for specific nucleotide sequences in large databases.

If you encounter the below error while running the blastn command:

blastn: command not found

you may try installing the below package as per your choice of distribution:

Distribution Command
OS X brew install blast
Debian apt-get install ncbi-blast+
Ubuntu apt-get install ncbi-blast+
Kali Linux apt-get install ncbi-blast+
Fedora dnf install ncbi-blast+
Raspbian apt-get install ncbi-blast+

Once blastn is installed, you can use it to perform a nucleotide-nucleotide search by running the blastn command followed by the appropriate options and arguments. For example, to search for a specific nucleotide sequence in a database of nucleotide sequences using a custom scoring matrix, you could use the following command:

# blastn -query my_sequence.fa -db nucleotide_database.fa -matrix custom_matrix.txt

blastn supports a variety of command-line options that allow you to customize the search parameters, such as the database to use, the output format, or the filtering options. You can use these options to fine-tune the search to suit your needs.

blastn Command Examples

1. Align two or more sequences using megablast (default), with the e-value threshold of 1e-9, pairwise output format (default):

# blastn -query query.fa -subject subject.fa -evalue 1e-9

2. Align two or more sequences using blastn:

# blastn -task blastn -query query.fa -subject subject.fa

3. Align two or more sequences, custom tabular output format, output to file:

# blastn -query query.fa -subject subject.fa -outfmt '6 qseqid qlen qstart qend sseqid slen sstart send bitscore evalue pident' -out output.tsv

4. Search nucleotide databases using a nucleotide query, 16 threads (CPUs) to use in the BLAST search, with a maximum number of 10 aligned sequences to keep:

# blastn -query query.fa -db path/to/blast_db -num_threads 16 -max_target_seqs 10

5. Search the remote non-redundant nucleotide database using a nucleotide query:

# blastn -query query.fa -db nt -remote

6. Display help (use `-help` for detailed help):

# blastn -h

Filed Under: Linux

Some more articles you might also be interested in …

  1. gdal2tiles.py: Generate TMS or XYZ tiles for a raster dataset
  2. Linux OS Service ‘rpcgssd’
  3. virt-manager: command not found
  4. sam: command not found
  5. checkupdates : Command Examples in Linux
  6. “hg log” Command Examples
  7. ldconfig Command Examples in Linux
  8. gh help: Display help about the GitHub CLI command
  9. mate-search-tool Command Examples in Linux
  10. How to setup passwordless SSH login in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright