File size: 20,507 Bytes
a03fc9f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 | {
"name": "UltraMS MSnLib formula-level split",
"short_name": "UltraMS MSnLib split A (full library, formula-disjoint 80/10/10)",
"version": "1.0.0",
"date": "2026-11-04",
"license": "CC BY 4.0",
"description": "Frozen formula-level train/validation/test split of the complete MSnLib tandem mass spectral library (560,084 spectra, all adducts). Every spectrum of a molecular formula lies in exactly one fold; the three folds are disjoint at the molecular-formula level. This is the benchmark population for candidate ranking, multiple-spectrum voting, label-blind grouping and embedding analyses of the UltraMS manuscript (Figures 2b/2j, 3a/3b/3d/3g, 3a_sp_4, 3a_sp_5 and the single-spectrum baselines).",
"definition": {
"unit": "neutral molecular formula, computed with RDKit rdMolDescriptors.CalcMolFormula(Chem.MolFromSmiles(smiles))",
"assignment": "the frozen `fold` column of MSnLib.csv; this file is the frozen benchmark definition",
"proportions": "frozen, approximately 80/10/10 by formula group (train 80.0%, val 10.0%, test 10.0%)",
"rule": "formula-disjoint: all spectra sharing a formula lie in the same fold (0 conflicting formulas observed)",
"not_molecule_disjoint": "the same canonical molecule can occur in more than one fold when its SMILES variants have different molecular formulas is impossible, but a formula can contain several molecules; molecule-level disjointness is provided only by split B of the UltraMS MSnLib benchmark package"
},
"source": {
"msnlib_csv": {
"path_in_data_workspace": "datasets/MSnLib/MSnLib.csv",
"data_rows": 560084,
"bytes": 752707651,
"sha256": "be54b33039cf18675751ea3c6354b592177c899a0cd5df303ae616330133ec07",
"columns": [
"mzs",
"intensities",
"smiles",
"precursor_mz",
"adduct",
"collision_energy",
"fold"
],
"csv_line_to_data_row": "physical line = data row + 2 (header = line 1, no embedded newlines)"
},
"msnlib_original_release": {
"citation": "Brungs C., Schmid R., Pluskal T. MSnLib: efficient generation of open multi-stage fragmentation mass spectral libraries. Zenodo record 10.5281/zenodo.11163380 (2024), CC BY 4.0.",
"zenodo_record": "11163380",
"format": "per-file JSONL record lists (*_ms2.json)",
"n_files": 18,
"n_records_total": 560084,
"note": "the 18 MSnLib original MS2 JSONL files contain exactly 560,084 records, equal to the MSnLib.csv data-row count"
},
"msnlib_with_rt": {
"path_in_data_workspace": "datasets/MSnLib/MSnLib_with_rt.csv",
"bytes": 755984910,
"sha256": "a5b7c38228287c5c1de401050445319b331ee9a5f17993d6e104e9a734fe2964",
"columns": [
"mzs",
"intensities",
"smiles",
"precursor_mz",
"adduct",
"collision_energy",
"fold",
"rt"
],
"note": "source of the compact retention-time table; verified row-by-row to have the same row order and the same first seven columns as MSnLib.csv (560,084 rows, 0 mismatches)"
}
},
"method": [
"read MSnLib.csv in source order (560,084 data rows)",
"cache RDKit formula and canonical isomeric SMILES per distinct source SMILES string (48,597 distinct strings)",
"verify that the fold label is a function of the molecular formula: every formula occurs in exactly one fold",
"write formula_split.csv (formula, fold, n_spectra), row_formula_fold.csv (all 560,084 rows), the test and validation spectra tables and the two multiple-spectrum voting tables",
"cross-check the exported test/validation spectra against the historical per-fold CSV files and sample the recorded `formula` fields of the MSnLib original JSON records"
],
"environment": {
"run": "isolated data-preparation environment with read-only access to the MSnLib data workspace; nothing was written on the remote side",
"python": "3.10.12",
"rdkit": "2026.03.5",
"numpy": "2.2.6",
"local_postprocessing": "macOS, Python 3.13.11, numpy 2.4.4, pandas 3.0.3, RDKit 2026.03.3 (only gzip generation, the canonical voting view and cross-checks)"
},
"expected_vs_observed": {
"n_data_rows": {
"expected": 560084,
"observed": 560084,
"match": true
},
"n_unique_formula": {
"expected": 21107,
"observed": 21107,
"match": true
},
"n_formula_groups_train": {
"expected": 16885,
"observed": 16885,
"match": true
},
"n_formula_groups_val": {
"expected": 2110,
"observed": 2110,
"match": true
},
"n_formula_groups_test": {
"expected": 2112,
"observed": 2112,
"match": true
},
"n_spectra_train": {
"expected": 446667,
"observed": 446667,
"match": true
},
"n_spectra_val": {
"expected": 55980,
"observed": 55980,
"match": true
},
"n_spectra_test": {
"expected": 57437,
"observed": 57437,
"match": true
},
"n_formula_conflicts": {
"expected": 0,
"observed": 0,
"match": true
},
"n_rdkit_parse_failures": {
"expected": 0,
"observed": 0,
"match": true
},
"voting_groups_official_source_smiles": {
"expected": 5002,
"observed": 5002,
"match": true
},
"voting_spectra_official_source_smiles": {
"expected": 57436,
"observed": 57436,
"match": true
},
"voting_groups_canonical_view": {
"expected": 4888,
"observed": 4888,
"match": true
},
"voting_spectra_canonical_view": {
"expected": 57436,
"observed": 57436,
"match": true
}
},
"counts": {
"unique_formula_total": 21107,
"unique_formula_by_fold": {
"train": 16885,
"val": 2110,
"test": 2112
},
"spectra_by_fold": {
"train": 446667,
"val": 55980,
"test": 57437
},
"spectra_per_formula": {
"min": 1,
"max": 627,
"mean": 26.535,
"median": 15,
"n_formulas_with_one_spectrum": 25
},
"unique_raw_smiles_total": 48597,
"unique_canonical_isomeric_smiles_total": 47662,
"canonical_smiles_with_multiple_source_variants": 935,
"test": {
"n_spectra": 57437,
"n_formulas": 2112,
"n_unique_source_smiles": 5003,
"n_unique_canonical_isomeric_smiles": 4889,
"n_adducts": 11,
"adduct_counts": {
"[M+H]+": 31763,
"[M-H]-": 13824,
"[M+FA]-": 5884,
"[M+Cl]-": 2403,
"[M+H-H2O]+": 1252,
"[M+NH4]+": 1189,
"[M+Na]+": 583,
"[M]+": 287,
"[M+H-2H2O]+": 169,
"[M-H2O]+": 59,
"[M]-": 24
},
"collision_energy_counts": {
"15.0": 4264,
"20.0": 30383,
"30.0": 6041,
"45.0": 3289,
"60.0": 13429,
"75.0": 31
}
},
"validation": {
"n_spectra": 55980,
"n_formulas": 2110,
"n_unique_source_smiles": 4883,
"n_unique_canonical_isomeric_smiles": 4786,
"n_adducts": 11,
"adduct_counts": {
"[M+H]+": 30210,
"[M-H]-": 14160,
"[M+FA]-": 5700,
"[M+Cl]-": 2614,
"[M+H-H2O]+": 1070,
"[M+NH4]+": 1043,
"[M+Na]+": 597,
"[M]+": 330,
"[M+H-2H2O]+": 193,
"[M-H2O]+": 36,
"[M]-": 27
}
}
},
"tables": {
"formula_split.csv": {
"columns": [
"formula",
"fold",
"n_spectra"
],
"n_rows": 21107,
"ordering": "fold order train, val, test; then formula lexicographically",
"bytes": 424350,
"sha256": "fcc44d1996d25306c884a6f8da30c1447fbe74f93c6fa12a3f271c0475a704b8",
"gzip": {
"bytes": 86748,
"sha256": "d52d77139c06d8662972fa638981894cf9f88fb3a5da1e1b73017b939d19fd4a"
}
},
"row_formula_fold.csv": {
"columns": [
"row_index",
"formula",
"fold"
],
"n_rows": 560084,
"ordering": "MSnLib.csv data-row order (row_index = 0 .. 560,083)",
"bytes": 13351630,
"sha256": "ac6113867fdda683304533f097fc7287c13271a2deac8e792d1316dcf00264ff",
"gzip": {
"bytes": 1248826,
"sha256": "86150a89fb601a117d43c995065c3abc95ab0710cb80ffe47dfa5413aa57e686"
}
},
"test_spectra.csv": {
"columns": [
"row_index",
"smiles",
"precursor_mz",
"adduct",
"collision_energy",
"fold",
"canonical_isomeric_smiles"
],
"n_rows": 57437,
"ordering": "MSnLib.csv data-row order",
"bytes": 7751575,
"sha256": "f2a870ba8ac9a54a36feaf1ecc12929ad9250ade2d082dc31454028c4b66b548",
"gzip": {
"bytes": 409844,
"sha256": "afb5c538d969bbfccd626a02a78572083a0830a8af0c52a39a45403e3ec71352"
}
},
"val_spectra.csv": {
"columns": [
"row_index",
"smiles",
"precursor_mz",
"adduct",
"collision_energy",
"fold",
"canonical_isomeric_smiles"
],
"n_rows": 55980,
"ordering": "MSnLib.csv data-row order",
"bytes": 7421554,
"sha256": "f4fa5e0f8875991bf9df2bcb67a05437271ee18c317f33d9108f3ec28a887a82",
"gzip": {
"bytes": 401530,
"sha256": "d2e45289b564b40998479e7c3fe7b283097f1a9aebe798e369b259c7f1851cce"
}
},
"test_molecules_voting.csv": {
"columns": [
"group_id",
"smiles",
"n_spectra"
],
"n_rows": 5002,
"n_spectra": 57436,
"role": "official multiple-spectrum voting units (Figure 3d / 3a voting): test spectra grouped by the MSnLib source SMILES string; group_id = 0-based rank over sorted source SMILES",
"bytes": 276185,
"sha256": "edad6ec7d6b6f9fc4763deac5245207aee767c78661532621c87acc5a9b1ee07",
"gzip": {
"bytes": 72880,
"sha256": "72ae163ce88b15d89fb1d556fbb8a698d001dd1e923df11399df13dfddec3db2"
}
},
"test_molecules_voting_canonical_view.csv": {
"columns": [
"group_id",
"canonical_isomeric_smiles",
"n_spectra"
],
"n_rows": 4888,
"n_spectra": 57436,
"role": "alternative canonical view (not the official voting unit): the same test spectra grouped by RDKit canonical isomeric SMILES",
"bytes": 269502,
"sha256": "9fcd16ff4159e665833ea145848f94bee7c44115f4a858dd75fe486f15e92bd0",
"gzip": {
"bytes": 70897,
"sha256": "332c03eab3e9f91b0f956c59cd01c22f633166bd285e9942f5507839625f5bc0"
}
},
"msnlib_rt.csv.gz": {
"columns": [
"row_index",
"rt"
],
"n_rows": 560084,
"role": "compact per-spectrum retention time (seconds), 0-based MSnLib.csv data row order; gzipped only to keep the package compact",
"bytes": 1483069,
"sha256": "994053612db874f7ac7985f278e04cc3463f3b93cd649a195bd167c4c6c7d3d8",
"note": "exported from MSnLib_with_rt.csv after a row-by-row first-seven-column alignment check (560,084 rows, 0 mismatches, 0 unparsable RT values)"
}
},
"verification": {
"formula_level_consistency": {
"n_formulas_with_more_than_one_fold": 0,
"n_raw_smiles_with_more_than_one_fold": 0,
"n_canonical_molecules_with_more_than_one_fold": 0,
"status": "PASS (every formula belongs to exactly one fold)"
},
"rdkit_parsing": {
"n_parse_failures": 0,
"n_unique_smiles": 48597,
"status": "PASS (all 48,597 distinct source SMILES parse)"
},
"historical_fold_csv_cross_check": {
"test": {
"path": "datasets/MSnLib/MSnLib_test.csv",
"label": "test",
"status": "match",
"n_rows": 57437,
"n_expected": 57437,
"mismatch_examples": []
},
"validation": {
"path": "datasets/MSnLib/MSnLib_val.csv",
"label": "val",
"status": "match",
"n_rows": 55980,
"n_expected": 55980,
"mismatch_examples": []
},
"checked_columns": [
"smiles",
"precursor_mz",
"adduct",
"collision_energy"
],
"status": "PASS (row order and values identical)"
},
"msnlib_original_formula_cross_check": {
"files_checked_first_record": 18,
"first_record_formula_mismatches": 0,
"streamed_records": 37177,
"streamed_formula_mismatches": 0,
"streamed_files": [
"20241003_enammol_neg_ms2.json",
"20241003_enammol_pos_ms2.json"
],
"sample_formula_C10H10BrN5O2": {
"n_original_records_checked": 3,
"n_rdkit_equals_record_formula": 3,
"records": [
{
"file": "20241003_mcescaf_pos_ms2.json",
"line": 9998,
"smiles": "O=C1CNC(=O)N1C1CN(c2ncc(Br)cn2)C1",
"record_formula": "C10H10BrN5O2",
"rdkit_formula": "C10H10BrN5O2",
"adduct": "[M+H]+"
},
{
"file": "20250828_mcediv_50k_sub_neg_ms2.json",
"line": 23736,
"smiles": "O=C1CNC(=O)N1C1CN(c2ncc(Br)cn2)C1",
"record_formula": "C10H10BrN5O2",
"rdkit_formula": "C10H10BrN5O2",
"adduct": "[M-H]-"
},
{
"file": "20250828_mcediv_50k_sub_pos_ms2.json",
"line": 2551,
"smiles": "COc1ccc(Br)cc1C(=O)Nc1nnn(C)n1",
"record_formula": "C10H10BrN5O2",
"rdkit_formula": "C10H10BrN5O2",
"adduct": "[M+H]+"
}
],
"msnlib_csv_spectra_with_this_formula": 23,
"msnlib_csv_folds": {
"train": 23
}
},
"status": "PASS (recorded formula field equals the RDKit formula of the recorded SMILES)"
},
"repository_voting_table_cross_check": {
"repository_file": "benchmarks/molecular_identification/data/multiple_spectrum_voting_summary.csv",
"repository_n_molecules": 5002,
"our_grouping_matching_repository": "test_molecules_voting.csv",
"repository_comparison_table": "benchmarks/molecular_identification/data/multiple_spectrum_voting_per_group.csv.gz",
"repo_groups": 5002,
"repo_spectra": 57436,
"smiles_grouping_member_sets_identical": true,
"canonical_grouping_member_sets_identical": false,
"canonical_groups_merged_from_smiles_groups": 114,
"repo_strings_are_source_smiles": true,
"status": "PASS for the MSnLib-source-SMILES grouping (member sets identical); the canonical-isomeric-SMILES grouping merges 114 of those groups into 4,888 chemically identical molecules"
},
"rt_export": {
"source_file": "MSnLib_with_rt.csv",
"source_bytes": 755984910,
"source_sha256": "a5b7c38228287c5c1de401050445319b331ee9a5f17993d6e104e9a734fe2964",
"alignment_method": "row-by-row equality of the first seven columns (mzs, intensities, smiles, precursor_mz, adduct, collision_energy, fold) between MSnLib.csv and MSnLib_with_rt.csv, in file order",
"n_rows": 560084,
"n_row_mismatches": 0,
"n_extra_rows": 0,
"n_unparsable_rt": 0,
"n_distinct_rt_strings": 8369,
"rt_is_constant": false,
"status": "PASS (same row order and identical first seven columns; RT exported as row_index,rt)"
},
"replay": {
"script": "build_split_a.py",
"command": "python3 build_split_a.py --csv datasets/MSnLib/MSnLib.csv # read-only, no output dir",
"run_on": "isolated data-preparation environment (read-only), RDKit 2026.03.5",
"status": "PASS (all 12 count checks and all 6 table SHA-256 checks matched; exit 0)",
"transcript": [
"[PASS] n_data_rows: 560,084 (expected 560,084)",
"[PASS] n_unique_formula: 21,107 (expected 21,107)",
"[PASS] n_formula_train: 16,885 (expected 16,885)",
"[PASS] n_formula_val: 2,110 (expected 2,110)",
"[PASS] n_formula_test: 2,112 (expected 2,112)",
"[PASS] n_spectra_train: 446,667 (expected 446,667)",
"[PASS] n_spectra_val: 55,980 (expected 55,980)",
"[PASS] n_spectra_test: 57,437 (expected 57,437)",
"[PASS] n_voting_groups_official: 5,002 (expected 5,002)",
"[PASS] n_voting_spectra_official: 57,436 (expected 57,436)",
"[PASS] n_voting_groups_canonical: 4,888 (expected 4,888)",
"[PASS] n_voting_spectra_canonical: 57,436 (expected 57,436)",
"[PASS] formula_split.csv: 424,350 bytes sha256 fcc44d1996d25306c884a6f8da30c1447fbe74f93c6fa12a3f271c0475a704b8",
"[PASS] row_formula_fold.csv: 13,351,630 bytes sha256 ac6113867fdda683304533f097fc7287c13271a2deac8e792d1316dcf00264ff",
"[PASS] test_spectra.csv: 7,751,575 bytes sha256 f2a870ba8ac9a54a36feaf1ecc12929ad9250ade2d082dc31454028c4b66b548",
"[PASS] val_spectra.csv: 7,421,554 bytes sha256 f4fa5e0f8875991bf9df2bcb67a05437271ee18c317f33d9108f3ec28a887a82",
"[PASS] test_molecules_voting.csv: 276,185 bytes sha256 edad6ec7d6b6f9fc4763deac5245207aee767c78661532621c87acc5a9b1ee07",
"[PASS] test_molecules_voting_canonical_view.csv: 269,502 bytes sha256 9fcd16ff4159e665833ea145848f94bee7c44115f4a858dd75fe486f15e92bd0"
]
}
},
"anomalies": [
{
"id": "official_voting_unit_source_smiles",
"severity": "documented definition difference, not a data error",
"expected_by_task": "5,002 groups / 57,436 spectra for the published multiple-spectrum voting task (n_molecules = 5002)",
"observed": "official MSnLib-source-SMILES grouping: 5,002 groups / 57,436 spectra (test_molecules_voting.csv); RDKit canonical-isomeric-SMILES grouping: 4,888 groups / 57,436 spectra (test_molecules_voting_canonical_view.csv)",
"explanation": "The published multiple-spectrum-voting task groups the 57,437 test spectra by the `smiles` field of its frozen single-spectrum records, which is the MSnLib source SMILES string. 5,003 distinct source strings exist for the test fold, one of which occurs in only one spectrum, leaving 5,002 groups covering 57,436 spectra. RDKit canonical isomeric SMILES merges SMILES variants of the same molecule: the test fold has 4,889 distinct canonical molecules, 4,888 of which have >= 2 spectra, again covering 57,436 spectra and leaving the same single-spectrum molecule (CC(C)(C)OC(=O)NCC1(CC(=O)O)CCCCC1) outside the voting table.",
"evidence": "our official MSnLib-source-SMILES grouping reproduces the repository `multiple_spectrum_voting_per_group.csv.gz` member sets and group sizes exactly (5,002 groups, 57,436 spectra); the canonical view merges 114 pairs/sets of those groups into chemically identical molecules",
"resolution": "the 5,002 source-SMILES groups are the official voting unit for Figure 3d and the Figure 3a voting readouts; the 4,888-group canonical table is an alternative chemical-deduplication view",
"tables": [
"test_molecules_voting.csv (official, source-string, 5,002 groups)",
"test_molecules_voting_canonical_view.csv (alternative canonical view, 4,888 groups)"
]
}
],
"known_caveats": [
"Retention times are source metadata from the MSnLib release (CC BY 4.0). `msnlib_rt.csv.gz` aligns them to `MSnLib.csv` by 0-based data row (`row_index`); it is not one of the six replayable split tables and is shipped gzipped only.",
"Molecule identity strings (canonical_isomeric_smiles) were frozen with RDKit 2026.03.5; other RDKit patch releases can serialise the same molecule differently, so compare the published strings, not freshly canonicalised ones. Molecular formulas are stable across RDKit patch releases.",
"Split A is formula-disjoint, not molecule-disjoint: different molecules can share a formula and therefore a fold, and a molecule's spectra always share one formula and thus one fold. Split B (molecule-level, strict-adduct) is the only molecule-disjoint resource in this package; the two splits must not be combined into a global disjointness claim.",
"Mass spectra are not redistributed in this split directory: the tables carry source row pointers into MSnLib.csv (752,707,651 bytes, SHA-256 be54b33039cf18675751ea3c6354b592177c899a0cd5df303ae616330133ec07) and the MSnLib original release is available under CC BY 4.0.",
"row_index refers to MSnLib.csv data rows; its row order follows the frozen UltraMS MSnLib conversion of the MSnLib release records. The authoritative row -> formula -> fold mapping is row_formula_fold.csv."
]
}
|