# Bioconductor Rblast

Seamlessly interfaces the Basic Local Alignment Search Tool (BLAST) to search genetic...

- Repository: https://github.com/bioMate-AI/biomate-bioconductor-kb (793 stars)
- Category: Writing
- License: see repository
- Last updated: 2026-06-20
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add bioMate-AI/biomate-bioconductor-kb --skill bioconductor-rblast -g -a claude-code -y`
Codex: `npx skills add bioMate-AI/biomate-bioconductor-kb --skill bioconductor-rblast -g -a codex -y`
Cursor: `npx skills add bioMate-AI/biomate-bioconductor-kb --skill bioconductor-rblast -g -a cursor -y`
Gemini CLI: `npx skills add bioMate-AI/biomate-bioconductor-kb --skill bioconductor-rblast -g -a gemini-cli -y`

## Description

Seamlessly interfaces the Basic Local Alignment Search Tool (BLAST) to search genetic sequence data bases. This work was partially supported by grant no. R21HG005912 from the National Human Genome Research Institute.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# rblast

## Workflows

### Create Custom Blast Db

Create a custom BLAST database from user-provided sequences and query it locally.

```r
library(rBLAST)
library(Biostrings)
# Load example sequences
seq <- readRNAStringSet(system.file("examples/RNA_example.fasta", package = "rBLAST"))
# Write to FASTA
writeXStringSet(seq, filepath = "seqs.fasta")
# Create database
makeblastdb("seqs.fasta", db_name = "db/small", dbtype = "nucl")
```
Note: Input is an `XStringSet` object, and output is a set of local BLAST database files written to disk.

### Standard Workflow

Download, extract, and query an existing NCBI BLAST database using local BLAST.

```r
library(rBLAST)
# Download and extract 16S database
tgz_file <- blast_db_get("16S_ribosomal_RNA.tar.gz")
untar(tgz_file, exdir = "16S_rRNA_DB")

# Load existing database
bl <- blast(db = "./16S_rRNA_DB/16S_ribosomal_RNA")

# Query database
seq <- readRNAStringSet(system.file("examples/RNA_example.fasta", package = "rBLAST"))[1]
cl <- predict(bl, seq)
```
Note: Input is a path to a local BLAST database and a query `XStringSet` object; output is a `data.frame` of matches.

### Create And Query Custom Db

Seamlessly interfaces the Basic Local Alignment Search Tool (BLAST) to search genetic sequence data

```r
library(rBLAST)
library(Biostrings)
# 1. Read reference sequences
seq <- readRNAStringSet(system.file("examples/RNA_example.fasta", package = "rBLAST"))
# 2. Write sequences to a FASTA file
writeXStringSet(seq, filepath = "seqs.fasta")
# 3. Create custom BLAST database
makeblastdb("seqs.fasta", db_name = "db/small", dbtype = "nucl")
# 4. Load custom database
db <- blast("db/small")
# 5. Extract a subsequence fragment
fragment <- subseq(seq[1], start = 101, end = 200)
# 6. Query custom database
res <- predict(db, fragment)
```
Note: Input is a set of reference sequences and a query fragment; output is a `data.frame` of alignment matches.

The rest: https://github.com/bioMate-AI/biomate-bioconductor-kb/blob/HEAD/skills/genomics/rblast/SKILL.md
