# Bioconductor Msbackendmassbank

Mass spectrometry (MS) data backend supporting import and export of MS/MS library...

- Repository: https://github.com/bioMate-AI/biomate-bioconductor-kb (793 stars)
- Category: Data and ML
- 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-msbackendmassbank -g -a claude-code -y`
Codex: `npx skills add bioMate-AI/biomate-bioconductor-kb --skill bioconductor-msbackendmassbank -g -a codex -y`
Cursor: `npx skills add bioMate-AI/biomate-bioconductor-kb --skill bioconductor-msbackendmassbank -g -a cursor -y`
Gemini CLI: `npx skills add bioMate-AI/biomate-bioconductor-kb --skill bioconductor-msbackendmassbank -g -a gemini-cli -y`

## Description

Mass spectrometry (MS) data backend supporting import and export of MS/MS library spectra from MassBank record files. Different backends are available that allow handling of data in plain MassBank text file format or allow also to interact directly with MassBank SQL databases. Objects from this package are supposed to be used with the Spectra Bioconductor package. This package thus adds MassBank support to the Spectra package.

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

# MsBackendMassbank

## Workflows

### Standard Workflow

Mass spectrometry (MS) data backend supporting import and export of MS/MS library spectra from MassBank record files. Different backends are available that allow handling of data in plain MassBank text file format or allow also to interact directly with MassBank SQL databases. Objects from this package are supposed to be used with the Spectra Bioconductor package. This package thus adds MassBank support to the Spectra package.

```r
library(Spectra)
library(MsBackendMassbank)
fls <- dir(system.file("extdata", package = "MsBackendMassbank"), full.names = TRUE, pattern = "txt$")
sps <- Spectra(fls, source = MsBackendMassbank(), backend = MsBackendDataFrame(), nonStop = TRUE)
sps <- dropNaSpectraVariables(sps)
```
Input: A character vector of paths to MassBank text files. Output: A `Spectra` object containing the imported mass spectrometry data.

## When to Use
- Importing and exporting MS/MS library spectra from MassBank record files (plain text format) into `Spectra` objects.
- Querying and interacting directly with a local MassBank SQL database (MySQL or SQLite) using `MsBackendMassbankSql`.
- Comparing spectra similarity and generating mirror plots using `compareSpectra` and `plotSpectraMirror`.

## When NOT to Use
- For raw LC-MS data processing (e.g., peak picking, retention time correction), use `xcms`.
- For handling non-MassBank formats like mzML or mzXML without MassBank metadata, use standard `Spectra` backends like `MsBackendMzR`.

## Data Requirements
- Plain text files in MassBank record format (one file per spectrum), or a local SQL database containing MassBank release dumps.

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