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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

blastn Command Examples in Linux

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.

To use blastn, you will need to have the blastn package installed on your Linux system. You can install blastn using the package manager for your specific distribution of Linux, or you can download and install the latest version of the BLAST suite from the NCBI (National Center for Biotechnology Information) website.

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. CentOS / RHEL : Exclusion with Yum For Kernel Updates
  2. Command line parameters in shell scripts
  3. SSH Connection Refused by TCP Wrapper
  4. aria2c: Fast download utility (Command Examples)
  5. How To Disable MD5-based HMAC Algorithm’s for SSH
  6. ansible-inventory – Display or dump an Ansible inventory (Command Examples)
  7. ‘ip’ Command cheat sheet (Command Line Reference)
  8. engrampa Command Examples in Linux
  9. CentOS / RHEL : How to remove unused Physical Volume(PV) from Volume Group (VG) in LVM
  10. Linux OS Service ‘iptables’

You May Also Like

Primary Sidebar

Recent Posts

  • “aws s3 mv” Command Examples
  • “aws s3 mb” Command Examples
  • “aws s3 ls” Command Examples
  • “aws s3 cp” Command Examples

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright