BLAST+

Last updated November 04, 2023

BLAST (basic local alignment search tool) is an algorithm and program for comparing primary biological sequence information, such as the amino-acid sequences of proteins or the nucleotides of DNA and/or RNA sequences. Using BLAST+ on a CARC cluster involves several steps, including writing a batch script to submit your BLAST jobs to the SLURM scheduler. Below is a short guide on how to use BLAST+.

0.0.1 Load the BLAST Module to use it in interactive mode

module purge
module load usc
module load ncbi-blast+

0.0.2 or write a SLURM batch script and submit it to the cluster

Create a batch script (blast_job.slurm) that specifies the SLURM directives, the environment, and the execution command.

#!/bin/bash
#SBATCH --job-name=blast_search
#SBATCH --output=blast_%j.out
#SBATCH --error=blast_%j.err
#SBATCH --nodes=1
#SBATCH --ntasks=8
#SBATCH --time=01:00:00
#SBATCH --mem=4G
#SBATCH --partition=main
#SBATCH --account=ttrojan_123

module purge
module load usc
module load ncbi-blast+

# Your BLAST command
blastp -query your_query.fasta -db your_database -out results.out -evalue 0.01 -num_threads $SLURM_NTASKS

Replace your_query.fasta with your query file, your_database with the BLAST database you intend to search against, and adjust other BLAST parameters as needed.

0.0.3 Submit Your Job

Use the sbatch command to submit your job to the SLURM scheduler.

sbatch blast_job.slurm

0.0.4 Collecting Results

Once the job is completed, the results will be available in the file you specified in the BLAST command (e.g., results.out).