https://github.com/mhahsler/rblast
Interface for the Basic Local Alignment Search Tool (BLAST) - R-Package
https://github.com/mhahsler/rblast
bioconductor bioinformatics blast-search
Last synced: 5 days ago
JSON representation
Interface for the Basic Local Alignment Search Tool (BLAST) - R-Package
- Host: GitHub
- URL: https://github.com/mhahsler/rblast
- Owner: mhahsler
- License: gpl-3.0
- Created: 2015-10-07T19:33:35.000Z (over 9 years ago)
- Default Branch: devel
- Last Pushed: 2025-01-07T00:42:39.000Z (4 months ago)
- Last Synced: 2025-04-03T20:10:28.010Z (about 2 months ago)
- Topics: bioconductor, bioinformatics, blast-search
- Language: R
- Homepage:
- Size: 452 KB
- Stars: 106
- Watchers: 3
- Forks: 22
- Open Issues: 6
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
README
---
output: github_document
---
```{r echo=FALSE, results = 'asis'}
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:
* [rRDP](https://bioconductor.org/packages/rRDP): Interface to the RDP Classifier
* [rMSA](https://mhahsler.r-universe.dev/rMSA): Interface for Popular Multiple
Sequence Alignment Tools including ClustalW, MAFFT, MUSCLE, and Kalign## Installation
1. Install the BLAST software by following the instructions in the
[INSTALL](https://github.com/mhahsler/rBLAST/blob/devel/INSTALL) file.2. Install the latest version of the R package
```{r eval = FALSE}
if (!require("BiocManager", quietly = TRUE)) {
install.packages("BiocManager")
}
# The following initializes usage of Bioc devel
BiocManager::install(version='devel')
BiocManager::install("rBLAST")
```## Usage
```{r, message=FALSE}
library(rBLAST)
```Download the prebuilt 16S Microbial data base from NCBI's ftp server at:
https://ftp.ncbi.nlm.nih.gov/blast/db/```{r}
tgz_file <- blast_db_get("16S_ribosomal_RNA.tar.gz")
untar(tgz_file, exdir = "16S_rRNA_DB")
```Load the downloaded BLAST database.
```{r}
bl <- blast(db = "./16S_rRNA_DB/16S_ribosomal_RNA")
bl
```Load some test sequences shipped with the package.
```{r}
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.```{r}
cl <- predict(bl, seq[1, ], BLAST_args = "-perc_identity 99")
cl
``````{r, include=FALSE}
unlink("./16S_rRNA_DB", recursive = TRUE)
```## Citation Request
```{r, echo=FALSE, results='asis', comment= ""}
pkg_citation(pkg)
```## Acknowledgments
This work was partially supported by grant no. R21HG005912 from the [National Human Genome Research Institute](https://www.genome.gov/).