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:
Install the BLAST software by following the instructions in the INSTALL file.
Install the latest version of the R package ```r if (!require("BiocManager", quietly = TRUE)) { install.packages("BiocManager") }
BiocManager::install(version='devel')
BiocManager::install("rBLAST") ```
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)
pkg_citation(pkg)
This work was partially supported by grant no. R21HG005912 from the National Human Genome Research Institute.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.