massbank3

Current MassBank software, with frontend and REST backend.

https://github.com/massbank/massbank3

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.8%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Current MassBank software, with frontend and REST backend.

Basic Info
  • Host: GitHub
  • Owner: MassBank
  • License: gpl-3.0
  • Language: TypeScript
  • Default Branch: main
  • Homepage: https://massbank.eu/
  • Size: 35.3 MB
Statistics
  • Stars: 6
  • Watchers: 18
  • Forks: 3
  • Open Issues: 12
  • Releases: 16
Created about 3 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog License Citation

README.md

codecov go-test

MassBank3

MassBank3 is the spectral reference library's next generation software product. The system consists of a modern software architecture and provides a new REST API with different services and a completely redesigned user interface.

This software is running at https://massbank.eu. It also provides a graphical interface using Swagger UI to get insights into the different REST API endpoints and their specifications.

There is a parallel instance at https://msbi.ipb-halle.de/MassBank. You can find the API's graphical interface here.

Installation

There are currently two ways to run MassBank:

  1. Docker Compose
  2. Kubernetes/Helm Charts

Docker Compose

Basic Settings

Make sure that Docker and Docker Compose are installed on your computer and ready to use.

Then clone the repository:

git clone https://github.com/MassBank/MassBank3.git

The directory MassBank/compose contains the env.dist file which serves as a template for environment variables. The system expects an .env file in that directory.

So navigate to that directory and copy the env.dist file into a new .env file.

cd MassBank3/compose && \
cp env.dist .env

The default structure of the data folder looks like the following:

/MassBank3
|---...
|---/compose
|---/data
    |---/MassBank-data
    |---/postgres-data
|---...

The path to PostgreSQL via DBLOCALPATH is "/MassBank3/data/postgres-data" by default. "/MassBank3/data/MassBank-data" is the default directory to store the MassBank data in record file format needed import data to different services and can be set via MBDATADIRECTORY.

And in order to provide the MassBank data to the services, download the latest release of MassBank data, unpack it and move the contributor's directories into data directoy (default):

mkdir ../data && \
wget https://github.com/MassBank/MassBank-data/archive/refs/heads/main.tar.gz && \
tar -xf main.tar.gz && \
mv MassBank-data-main ../data/MassBank-data/ && \
rm main.tar.gz

Now use docker compose to start the system (in daemon mode):

docker compose up -d

[!NOTE] Initially, the property MBDBINIT is set to true. Change that value to false after the database was filled within the first start. The database filling takes some time (circa 30 minutes on Apple's M3 Pro chip and a Docker environment with 4 CPUs and 8GB RAM allowed). The mb3tool service is responsible for that and stops running after finishing that task. Meanwhile you can check the amount of already imported data via the content page (frontend) or via following command line:

curl http://localhost:8081/MassBank-api/records/count

To stop the system use:

docker compose down -v

Advanced Settings

Add Custom MassBank Data

It's possible to add custom MassBank record data to your own MassBank instance. Simply add your MassBank files as subdirectory (or multiple directories) to the directory which was previously set via MBDATADIRECTORY (default is "/MassBank3/data/MassBank-data").

[!NOTE] The MassBank files need to be in the specified MassBank format. That means, every file should contain its own accession ID, peaks etc., see MassBank Record Format. In addition, each file name should contain the same accession ID and end with „.txt“, e.g. "MSBNK-IPB_Halle-PB001341.txt".

Distributor's Information

The DISTRIBUTORTEXT_ property is a free text field to insert any description of the distributor of a running MassBank instance.

And DISTRIBUTORURL_ should contain the URL to the distributor's imprint/website.

Title in Browser Tab

To customise the title in the web browser change the MB3FRONTENDBROWSERTABTITLE property.

Introduction/Welcome Text

A substitution of the text below the MassBank logo on the homepage is possible via editing MB3FRONTENDHOMEPAGEINTROTEXT.

Overwrite/Disable the News and Funding Section on Homepage

Both MB3FRONTENDHOMEPAGENEWSSECTIONTEXT_ and MB3FRONTENDHOMEPAGEFUNDINGSECTIONTEXT_ can be non-empty strings to replace the news and funding section content on the homepage with a free text. Set the value "disabled" to disable a section.

Add additional Section to Homepage

To enable a custom section with free text content set the variable MB3FRONTENDHOMEPAGEADDITIONALSECTIONNAME_ and MB3FRONTENDHOMEPAGEADDITIONALSECTIONTEXT_. As the names indicate, the first stands for the section name while the latter is the text to fill that section.

Extended HTML Head and Body

Head File

This optional feature enables to import of custom content in every webpage's HTML head of MassBank. This can be useful for the verification of your MassBank instance by Google search console or Bing, for example, or if the import of external libraries is needed when executing custom HTML body file content (see below).

If the .env file contains a non-empty HTMLHEADFILE property then its file content will be included in the head section of every HTML document of the web interface.

Body File

This optional feature enables the import of custom content in every webpage's HTML body of MassBank. This feature can be useful to implement a customised data privacy management, e.g. tracking. To display a data privacy section in every webpage's footer, the root element needs to have the id "data-privacy-container".

If the .env file contains a non-empty HTMLBODYFILE property then its file content will be included in the body section of every HTML document of the web interface to enable the data privacy management button. The HTML file content is responsible for what is shown in the graphical interface and for the executed code. The MassBank implementation does not influence or control that.

Mount Local Directory

In order to mount the HTML files, the variable HTMLLOCALDIR needs to be set to a local directory. For example in the root of the project.

Additionally, the volume needs to be mounted. Therefore, firstly, the directory (HTMLLOCALDIR) needs to be created and contain the head or both HTML files. Secondly, the volumes tag in the frontend section in the docker-compose file has to be re-activated.

Troubleshooting

In case your system is different from linux/amd64 then a warning might appear after starting docker compose:

The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested

Add the following properties to postgres, similarity-service and export-service in the docker-compose.yaml file to solve that problem:

platform: linux/amd64

Kubernetes/Helm Charts

A description is available at https://github.com/MassBank/MassBank-charts.

Frontend

The frontend can by default be accessed in the webbrowser at http://localhost:8080/MassBank and is composed via:

http://${MB3_FRONTEND_HOST}:${MB3_FRONTEND_PORT}${MB3_FRONTEND_BASE_URL}

REST API

To access this on your running instance, just visit the API URL in the browser. By default it is http://localhost:8081/MassBank-api and is defined by the environment variable MB3APIURL and concatenated via:

http://${MB3_API_HOST}:${MB3_API_PORT}${MB3_API_BASE_URL}

Examples

/records Endpoint

InChIKey

In order to get all records from the running instance at the API URL with an InChIKey of KWILGNNWGSNMPA-UHFFFAOYSA-N call the following URL:

{MB3_API_URL}/records?inchi_key=KWILGNNWGSNMPA-UHFFFAOYSA-N

The corresponding URL with default value (http://localhost:8081/MassBank-api) is:

http://localhost:8081/MassBank-api/records?inchi_key=KWILGNNWGSNMPA-UHFFFAOYSA-N

For example, to obtain the results via cURL use:

curl -X GET "http://localhost:8081/MassBank-api/records?inchi_key=KWILGNNWGSNMPA-UHFFFAOYSA-N"

The result is a set of complete MassBank records in JSON format.

Compound Name

To receive all records to the compound name mellein use:

http://localhost:8081/MassBank-api/records?compound_name=mellein

/records/search Endpoint

Compound Class

To receive all accession belonging to the compound class natural product use:

http://localhost:8081/MassBank-api/records/search?compound_class=natural+product

The result is a set of MassBank record IDs (accessions).

MS Type and Ion Mode

A request for searching MS2 spectra and negative ion mode looks like:

http://localhost:8081/MassBank-api/records/search?ms_type=MS2&ion_mode=NEGATIVE

Similarity Search

A similarity search request with the semicolon-separated tuples (m/z value, rel. intensity)

133.0648;225
151.0754;94
155.9743;112
161.0597;999
179.0703;750

and threshold value 0.8 looks like:

http://localhost:8081/MassBank-api/records/search?peak_list=133.0648%3B225%2C151.0754%3B94%2C155.9743%3B112%2C161.0597%3B999%2C179.0703%3B750&peak_list_threshold=0.8

The result is a set of MassBank record IDs (accessions) and the corresponding similarity score in JSON format. The calculation is done by the matchms package used in our similarity service.

Owner

  • Name: MassBank consortium
  • Login: MassBank
  • Kind: organization
  • Email: massbank-developer@lists.sf.net

The MassBank consortium develops an ecosystem of databases and tools for mass spectrometry reference spectra.

Citation (CITATION.cff)

cff-version: 1.2.0
title: "MassBank3: the spectral reference library's next generation software product."
message: "If you use this software, please cite it using these metadata."
abstract: "MassBank is an open-source mass spectral library containing high-resolution data for the identification of small chemical molecules of metabolomics, exposomics and environmental relevance."
authors:
  - family-names: Neumann
    given-names: Steffen
    orcid: https://orcid.org/0000-0002-7899-7192
    affiliation: "Leibniz Institute of Plant Biochemistry, Halle (Saale), Germany"
  - family-names: Schymanski
    given-names: Emma L.
    orcid: https://orcid.org/0000-0001-6868-8145
    affiliation: "University of Luxembourg, Luxembourg"
  - family-names: Meier
    given-names: René
    orcid: https://orcid.org/0000-0002-1501-1349
    affiliation: "Leibniz Institute of Plant Biochemistry, Halle (Saale), Germany"
  - family-names: Wenk
    given-names: Michael
    orcid: https://orcid.org/0000-0002-7868-2473
    affiliation: "Leibniz Institute of Plant Biochemistry, Halle (Saale), Germany"
  - family-names: Rauh
    given-names: David
    orcid: https://orcid.org/0000-0001-7499-1693

version: v2025.8.12
identifiers:
  - type: doi
    value: 10.5281/zenodo.16923315
date-released: 2025-08-28
license: GPL-3.0

GitHub Events

Total
  • Create event: 22
  • Release event: 7
  • Issues event: 31
  • Watch event: 5
  • Delete event: 23
  • Issue comment event: 17
  • Push event: 458
  • Pull request event: 53
  • Fork event: 1
Last Year
  • Create event: 22
  • Release event: 7
  • Issues event: 31
  • Watch event: 5
  • Delete event: 23
  • Issue comment event: 17
  • Push event: 458
  • Pull request event: 53
  • Fork event: 1

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 24
  • Total pull requests: 40
  • Average time to close issues: over 1 year
  • Average time to close pull requests: 1 day
  • Total issue authors: 6
  • Total pull request authors: 4
  • Average comments per issue: 0.13
  • Average comments per pull request: 0.03
  • Merged pull requests: 30
  • Bot issues: 0
  • Bot pull requests: 13
Past Year
  • Issues: 11
  • Pull requests: 27
  • Average time to close issues: about 1 month
  • Average time to close pull requests: 2 days
  • Issue authors: 4
  • Pull request authors: 4
  • Average comments per issue: 0.09
  • Average comments per pull request: 0.0
  • Merged pull requests: 18
  • Bot issues: 0
  • Bot pull requests: 13
Top Authors
Issue Authors
  • michaelwenk (11)
  • uly55e5 (10)
  • meier-rene (2)
  • sneumann (2)
  • egonw (1)
  • kaibioinfo (1)
  • tilfischer (1)
Pull Request Authors
  • michaelwenk (40)
  • github-actions[bot] (13)
  • sneumann (5)
  • meier-rene (1)
Top Labels
Issue Labels
task (8) enhancement (7) documentation (2) front end (2)
Pull Request Labels
autorelease: pending (14) bug (1)

Packages

  • Total packages: 1
  • Total downloads: unknown
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 0
proxy.golang.org: github.com/MassBank/MassBank3
  • Versions: 0
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.6%
Dependent repos count: 6.0%
Average: 9.9%
Stargazers count: 12.3%
Forks count: 15.8%
Last synced: 6 months ago

Dependencies

.github/workflows/create-docker.yml actions
  • actions/checkout v4 composite
  • docker/build-push-action v5 composite
  • docker/login-action v3 composite
  • docker/metadata-action v5 composite
.github/workflows/go-test.yml actions
  • actions/checkout v3 composite
  • actions/setup-go v3 composite
  • codecov/codecov-action v3 composite
  • supercharge/mongodb-github-action 1.8.0 composite
  • ${{matrix.postgres-images}} * docker
go.mod go
  • github.com/Code-Hex/dd v1.1.0
  • github.com/Microsoft/go-winio v0.5.2
  • github.com/ProtonMail/go-crypto v0.0.0-20221026131551-cf6655e29de4
  • github.com/acomagu/bufpipe v1.0.3
  • github.com/cloudflare/circl v1.1.0
  • github.com/emirpasic/gods v1.18.1
  • github.com/go-chi/chi/v5 v5.0.3
  • github.com/go-chi/cors v1.2.0
  • github.com/go-git/gcfg v1.5.0
  • github.com/go-git/go-billy/v5 v5.4.0
  • github.com/go-git/go-git/v5 v5.5.2
  • github.com/golang/snappy v0.0.1
  • github.com/imdario/mergo v0.3.13
  • github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99
  • github.com/kevinburke/ssh_config v1.2.0
  • github.com/klauspost/compress v1.13.6
  • github.com/lib/pq v1.10.7
  • github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe
  • github.com/mpvl/unique v0.0.0-20150818121801-cbe035fff7de
  • github.com/nullism/bqb v1.3.1
  • github.com/pjbgf/sha1cd v0.2.3
  • github.com/pkg/errors v0.9.1
  • github.com/sergi/go-diff v1.1.0
  • github.com/skeema/knownhosts v1.1.0
  • github.com/xanzy/ssh-agent v0.3.3
  • github.com/xdg-go/pbkdf2 v1.0.0
  • github.com/xdg-go/scram v1.1.1
  • github.com/xdg-go/stringprep v1.0.3
  • github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d
  • go.mongodb.org/mongo-driver v1.11.6
  • golang.org/x/crypto v0.3.0
  • golang.org/x/net v0.2.0
  • golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4
  • golang.org/x/sys v0.3.0
  • golang.org/x/text v0.4.0
  • gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22
  • gopkg.in/warnings.v0 v0.1.2
go.sum go
  • 116 dependencies
web-frontend/package-lock.json npm
  • 511 dependencies
web-frontend/package.json npm
  • @babel/plugin-transform-modules-commonjs ^7.23.3 development
  • @babel/preset-react ^7.23.3 development
  • @babel/preset-typescript ^7.23.3 development
  • @fortawesome/free-solid-svg-icons ^6.6.0 development
  • @fortawesome/react-fontawesome ^0.2.2 development
  • @types/node ^20.10.4 development
  • @types/react ^18.2.42 development
  • @types/react-dom ^18.2.17 development
  • @types/react-modal ^3.16.3 development
  • @typescript-eslint/eslint-plugin ^6.13.2 development
  • @typescript-eslint/parser ^6.13.2 development
  • @vitejs/plugin-react ^4.2.1 development
  • eslint ^8.55.0 development
  • eslint-config-prettier ^9.1.0 development
  • eslint-plugin-prettier ^5.0.1 development
  • eslint-plugin-react ^7.33.2 development
  • eslint-plugin-react-hooks ^4.6.0 development
  • prettier ^3.1.0 development
  • react-router-dom ^6.20.1 development
  • rimraf ^5.0.5 development
  • sass ^1.69.5 development
  • typescript ^5.3.3 development
  • vite ^5.0.6 development
  • @types/d3 ^7.4.3
  • axios ^1.6.8
  • chart.js ^4.4.2
  • d3 ^7.8.5
  • openchemlib ^8.7.2
  • react >=18.2.0
  • react-chartjs-2 ^5.2.0
  • react-dom >=18.2.0
  • react-hook-form ^7.52.1
  • react-loader-spinner ^6.0.0
  • react-mf ^2.0.2
  • react-modal ^3.16.1
  • react-multi-carousel ^2.8.5
  • react-ocl ^6.1.0