Dataset Viewer
Auto-converted to Parquet Duplicate
formula
stringlengths
5
17
fold
stringclasses
3 values
n_spectra
int64
1
627
C10H10BrN5O2
train
23
C10H10BrN5OS
train
13
C10H10BrNO3
train
5
C10H10Cl2N4O4
train
5
C10H10ClIN4
train
8
C10H10ClNO4S
train
13
C10H10F3N3O2S
train
31
C10H10F3NO2
train
36
C10H10F3NO3
train
8
C10H10F3NO3S
train
23
C10H10F3NO5S
train
5
C10H10FIN2O
train
14
C10H10FNO2
train
57
C10H10FNO3
train
20
C10H10IN5O
train
8
C10H10N2
train
5
C10H10N2O2
train
167
C10H10N2O2S
train
82
C10H10N2O3
train
125
C10H10N2O4S
train
10
C10H10N2O5S
train
20
C10H10N2OS
train
13
C10H10N4O2
train
18
C10H10N4O2S
train
37
C10H10O2
train
5
C10H10O2S
train
9
C10H10O3
train
121
C10H10O3S
train
5
C10H10O4
train
101
C10H10O4S
train
43
C10H10O5
train
28
C10H11BO4
train
5
C10H11BrF3N3
train
5
C10H11BrN2
train
5
C10H11BrN4
train
5
C10H11BrN4O2S
train
10
C10H11BrN5O6P
train
10
C10H11BrN5O7P
train
5
C10H11BrN6S
train
8
C10H11ClF2N4
train
8
C10H11ClFNO4S
train
8
C10H11ClN2O2
train
13
C10H11ClN2O3
train
39
C10H11ClN4
train
5
C10H11ClN4O4
train
8
C10H11ClN4OS
train
8
C10H11ClO3
train
25
C10H11F2NO4S2
train
5
C10H11F3N2O2
train
48
C10H11F3N2O3
train
13
C10H11F3N2O3S2
train
18
C10H11F3N2O5
train
61
C10H11F3N4O
train
13
C10H11F3N4O2S2
train
21
C10H11FN2O3
train
10
C10H11FN2O5S
train
5
C10H11FO3
train
8
C10H11N2+
train
5
C10H11N3O2
train
115
C10H11N3O3S
train
16
C10H11N3O5S
train
15
C10H11N3OS
train
16
C10H11N3S2
train
5
C10H11N5O
train
8
C10H11N5O2S
train
10
C10H11N5O4
train
5
C10H11NO2
train
183
C10H11NO3
train
345
C10H11NO3S
train
44
C10H11NO4
train
51
C10H11NO4S
train
13
C10H11NO5
train
5
C10H11NO7S
train
8
C10H12BrN3O
train
5
C10H12BrN3O2S
train
10
C10H12BrN5O2
train
13
C10H12BrN5OS
train
10
C10H12BrNO2
train
5
C10H12Cl2N2O3S
train
7
C10H12ClN3O3
train
5
C10H12ClN3O3S
train
5
C10H12ClN5O3
train
28
C10H12ClN5O4
train
15
C10H12ClNO2
train
73
C10H12ClNO4S2
train
10
C10H12ClNO6S
train
8
C10H12F2N4O2
train
16
C10H12F3N3O2
train
13
C10H12FN3O4
train
10
C10H12FN5O2S
train
5
C10H12FN5O3
train
13
C10H12FN5O4
train
24
C10H12FNO2
train
13
C10H12FNO4S
train
8
C10H12N2
train
24
C10H12N2O
train
13
C10H12N2O2
train
53
C10H12N2O2S
train
27
C10H12N2O3S2
train
16
C10H12N2O4
train
5
End of preview. Expand in Data Studio

UltraMS MSnLib benchmark

Zenodo DOI: 10.5281/zenodo.23963489

Two frozen, independent benchmark splits of the MSnLib tandem mass spectral library, released by UltraMS. The splits are different objects:

  • Split A — UltraMS MSnLib formula-level split (all 560,084 spectra, all adducts): 21,107 molecular formulas, split 16,885 / 2,110 / 2,112 formulas and 446,667 / 55,980 / 57,437 spectra into train / validation / test. Formula-disjoint. Test fold: 57,437 spectra, 2,112 formulas, 5,003 source SMILES / 4,889 canonical molecules. Population for single-spectrum candidate ranking, multiple-spectrum voting, label-blind grouping, fingerprint prediction and embedding analyses (Figure 2b/2j, 3a/3b/3d/3g, 3a_sp_4, 3a_sp_5, single-spectrum baselines). The official multiple-spectrum voting units are the 5,002 MSnLib source-SMILES groups covering 57,436 spectra (test_molecules_voting.csv); a canonical-SMILES alternative view (4,888 groups) is also provided (test_molecules_voting_canonical_view.csv). Per-spectrum retention times (row_index, rt in seconds) are in msnlib_rt.csv.gz for the label-blind grouping and multiple-spectrum voting analyses.
  • Split B — strict-adduct molecule-level split ([M+H]+ and [M-H]- only): 41,348 / 21,293 compounds and 301,636 / 140,193 preprocessed spectra, split 70/15/15 per polarity by RDKit canonical isomeric SMILES, with frozen queries and libraries for spectrum-to-spectrum library search. Population for Figure 3e/3f/3h, 3h_sp_1 and the cross-collision-energy task (6,161 positive / 2,999 negative queries).
split-B task queries library spectra queries with an exact-adduct library positive
[M+H]+ test 6,202 295,434 6,201
[M+H]+ validation 6,202 250,424 6,194
[M-H]- test 3,193 137,000 3,160
[M-H]- validation 3,193 116,135 3,163

Disjointness. Split A is formula-disjoint (no formula in two folds); split B is molecule-disjoint within each polarity (the train / validation / test compound sets are pairwise empty). The two splits must not be merged into a global-disjointness claim: about 41 % of split-B compounds lie in a different split-A fold, and a spectrum can be split-A test while its compound is split-B train. See the package figures_mapping.md §2 for the full cross-tabulation.

Usage

import pandas as pd

base = "https://huggingface.co/datasets/dsadd4/UltraMS-MSnLib-Benchmark/resolve/main/"

# split A — formula-level split of the full library
formulas = pd.read_csv(base + "split_A_full_msnlib/formula_split.csv")
rows = pd.read_csv(base + "split_A_full_msnlib/row_formula_fold.csv")      # 560,084 rows
test = pd.read_csv(base + "split_A_full_msnlib/test_spectra.csv")          # 57,437 rows
assert formulas.groupby("formula")["fold"].nunique().max() == 1

# split B — strict-adduct molecule-level library search
compound_split = pd.read_csv(base + "splits/pos_compound_split.csv")
queries = pd.read_csv(base + "queries/pos_test_queries.csv")
library = pd.read_csv(base + "libraries/pos_test_library.csv")

positives = library.groupby("canonical_isomeric_smiles").size()
n_pos = queries["canonical_isomeric_smiles"].map(positives).fillna(0).astype(int)
denominator = int((n_pos > 0).sum())      # 6,201

With datasets (one config per table, see the YAML header):

from datasets import load_dataset
queries = load_dataset("dsadd4/UltraMS-MSnLib-Benchmark", "split_B_pos_test_queries", split="train")

Peak data are not part of the split tables. Every row is joined back to the spectra by row_index / msnlib_csv_data_row / first_msnlib_csv_data_row, which point into MSnLib.csv. MSnLib.csv and MSnLib_candidates.json are hosted in the same dataset; see Hosted files below.

Columns

  • split_A_full_msnlib/formula_split.csv: formula, fold, n_spectra
  • split_A_full_msnlib/row_formula_fold.csv: row_index, formula, fold
  • split_A_full_msnlib/{test,val}_spectra.csv: row_index, smiles, precursor_mz, adduct, collision_energy, fold, canonical_isomeric_smiles
  • split_A_full_msnlib/test_molecules_voting.csv: group_id, smiles, n_spectra — official voting units: 5,002 MSnLib-source-SMILES groups covering 57,436 spectra, the grouping of the published multiple-spectrum voting task (n_molecules = 5002)
  • split_A_full_msnlib/test_molecules_voting_canonical_view.csv: group_id, canonical_isomeric_smiles, n_spectra — alternative canonical view: 4,888 groups covering the same 57,436 spectra
  • split_A_full_msnlib/msnlib_rt.csv.gz: row_index, rt — per-spectrum retention time in seconds, aligned 1:1 to the MSnLib.csv data rows (560,084 rows)
  • splits/*_compound_split.csv: polarity, compound_id, canonical_isomeric_smiles, split, n_spectra, n_frozen_queries, n_raw_smiles_variants, first_msnlib_csv_data_row
  • queries/*.csv: polarity, split, query_index, compound_id, canonical_isomeric_smiles, adduct, msnlib_csv_data_row, msnlib_csv_line, precursor_mz, n_peaks, collision_energy, source_smiles_raw, n_library_positives
  • libraries/*.csv: same as queries with library_index and compound_split instead of query_index; row order is the frozen library order

Split-B evaluation protocol

  1. Score every query against the complete library of its task (no candidate short list).
  2. Correct = the top-1 library spectrum has the same canonical compound identity.
  3. Empirical FDR = (accepted − correct) / accepted; identification recall = correct / n_queries_with_library_positive (6,201 / 3,160 for the two test tasks). Queries without a library positive enter the FDR denominator but not the recall denominator; n_library_positives is provided per query.
  4. The test library contains all preprocessed spectra of the polarity except the selected test queries; the validation library contains train and validation compounds only.
  5. Validation is for model selection only; evaluate the test fold once.

Hosted files

The dataset hosts the complete manifest plus two large source files. Every file of the manifest is checksummed in SHA256SUMS; the two large files are kept in a separate upload step (see hf_upload_commands.sh, dry-run by default).

hosted file bytes SHA-256 purpose
manifest: split_A_full_msnlib/, splits/, queries/, libraries/, protocol/, rebuild/, docs (59 files) ≈ 185.2 MiB see SHA256SUMS the two benchmark splits, verifier, docs
split_A_full_msnlib/msnlib_rt.csv.gz 1,483,069 994053612db874f7ac7985f278e04cc3463f3b93cd649a195bd167c4c6c7d3d8 compact per-spectrum retention time (row_index, rt in seconds), aligned 1:1 to MSnLib.csv; used by the label-blind grouping analysis
MSnLib.csv 752,707,651 be54b33039cf18675751ea3c6354b592177c899a0cd5df303ae616330133ec07 full source CSV: one row per MSnLib spectrum (560,084 rows); every row pointer in the split tables resolves here
MSnLib_candidates.json 1,368,264,026 125a1cdcc57a3fcef8cc76d5322ac0c434cd09b0bfb9e0c9d28bddf052f45fcc candidate SMILES lists behind the single-spectrum candidate-ranking task: a JSON object mapping a query SMILES string to its candidate SMILES list (9,886 query entries)

MSnLib.csv is the UltraMS CSV conversion of the MSnLib original release (Zenodo 10.5281/zenodo.11163380, CC BY 4.0), whose 18 per-file MS2 JSONL record lists contain the same 560,084 spectra. MSnLib_candidates.json contains candidate SMILES lists derived from the MSnLib compound set; both files carry the MSnLib attribution.

Provenance, verification, license

  • Source rows: MSnLib.csv (560,084 rows) converted from the MSnLib original release (Brungs et al., CC BY 4.0; Zenodo 10.5281/zenodo.11163380).
  • Hosted source files: MSnLib.csv (752,707,651 bytes, SHA-256 be54b330…) and MSnLib_candidates.json (1,368,264,026 bytes, SHA-256 125a1cdc…).
  • Frozen split-B manifest, seeds 42 / 43, query seed 119; frozen split-A fold assignment from the fold column of MSnLib.csv.
  • SHA256SUMS covers every file; rebuild/verify_release.py is a self-contained verifier that re-checks every count, ordering hash, disjointness statement, cross-split statistic and checksum offline.
  • License CC BY 4.0, with attribution to MSnLib (CC BY 4.0); Apache-2.0 for the two UltraMS producer scripts. See the package NOTICE.md.

Citation

@misc{ultrams_msnlib_benchmark_2026,
  title  = {UltraMS MSnLib benchmark: full-library formula-level split and strict-adduct molecule-level library-search split},
  author = {Li, Yifan and Zhong, Yunhua and Liu, Pan and Xia, Jun},
  year   = {2026},
  note   = {Derived from MSnLib (Brungs, Schmid, Pluskal; CC BY 4.0, Zenodo 10.5281/zenodo.11163380)},
  howpublished = {Hugging Face / Zenodo dataset, version 1.0.0}
}

Please also cite MSnLib (doi:10.1038/s41592-025-02813-0) and the UltraMS manuscript.

Downloads last month
-