pkg <- "rBLAST"

source("https://raw.githubusercontent.com/mhahsler/pkg_helpers/main/pkg_helpers.R")
pkg_title(pkg, CRAN = FALSE, Bioc = TRUE)

Interfaces the Basic Local Alignment Search Tool (BLAST) to search genetic sequence data bases with the Bioconductor infrastructure. This includes interfaces to blastn, blastp, blastx, and makeblastdb. The BLAST software needs to be downloaded and installed separately.

Other R interfaces for bioinformatics are also available:

Installation

  1. Install the BLAST software by following the instructions in the INSTALL file.

  2. Install the latest version of the R package ```r if (!require("BiocManager", quietly = TRUE)) { install.packages("BiocManager") }

    The following initializes usage of Bioc devel

    BiocManager::install(version='devel')

    BiocManager::install("rBLAST") ```

Usage

library(rBLAST)

Download the prebuilt 16S Microbial data base from NCBI's ftp server at: https://ftp.ncbi.nlm.nih.gov/blast/db/

tgz_file <- blast_db_get("16S_ribosomal_RNA.tar.gz")
untar(tgz_file, exdir = "16S_rRNA_DB")

Load the downloaded BLAST database.

bl <- blast(db = "./16S_rRNA_DB/16S_ribosomal_RNA")
bl

Load some test sequences shipped with the package.

seq <- readRNAStringSet(system.file("examples/RNA_example.fasta",
    package = "rBLAST"
))
seq

Query the BLAST database to find matches for the first test sequence with a 99% percent identity or higher.

cl <- predict(bl, seq[1, ], BLAST_args = "-perc_identity 99")
cl
unlink("./16S_rRNA_DB", recursive = TRUE)

Citation Request

pkg_citation(pkg)

Acknowledgments

This work was partially supported by grant no. R21HG005912 from the National Human Genome Research Institute.



mhahsler/rBLAST documentation built on Jan. 9, 2025, 4:16 a.m.