---
name: spectral-database-compilation
description: Use when you have generated predicted fragment spectra for a set of compounds using CFM-ID or similar in-silico prediction tools and need to organize these results into a persistent, queryable database that mirrors the schema of an existing online spectral reference (such as the predicted-fragments.
license: CC-BY-4.0
metadata:
  edam_operation: http://edamontology.org/operation_3096
  edam_topics:
  - http://edamontology.org/topic_0154
  - http://edamontology.org/topic_3520
  tools:
  - CFM-ID
  techniques:
  - mass-spectrometry
derived_from:
- doi: 10.3389/fchem.2022.908572
  title: DNA adduct database
evidence_spans:
- CFM-ID
- the CFM-ID spectra, the Chemdraw files, the mol files and the SDF files of the DNA adducts
claims: []
provenance:
  collection: https://w3id.org/holobiomicslab/asb-skill/collection/metabolomics/v2
  assembled_by: scripts/collect_metabolomics_collection.py
  sources:
  - build: coll_dna_adduct_database_cq
    doi: 10.3389/fchem.2022.908572
    title: DNA adduct database
  dedup_kept_from: coll_dna_adduct_database_cq
schema_version: 0.2.0
attribution:
  generator: AgenticScienceBuilder
  original_doi: 10.3389/fchem.2022.908572
  all_source_dois:
  - 10.3389/fchem.2022.908572
  zenodo_doi: 10.5281/zenodo.20794027
  curators: []
  promoter: Louis-Félix Nothias
  sponsor: CNRS & Université Côte d'Azur
---

# spectral-database-compilation

## Summary

Compile predicted fragment spectra generated by in-silico prediction tools into a structured database matching the format and schema of a reference online resource. This skill ensures systematic organization and validation of computational predictions for subsequent spectral matching and compound identification workflows.

## When to use

You have generated predicted fragment spectra for a set of compounds using CFM-ID or similar in-silico prediction tools and need to organize these results into a persistent, queryable database that mirrors the schema of an existing online spectral reference (such as the predicted-fragments database in the DNA adductomics project). Apply this skill when output from prediction tools must be deposited in a standardized format for downstream spectral library searches or when creating a reusable resource for community access.

## When NOT to use

- Predicted spectra have not yet been generated; first run CFM-ID or equivalent on compound structures.
- The goal is to validate or filter predicted spectra against experimental data; use spectral matching or library search instead.
- Input spectra are already in a validated, production database; compilation is redundant.

## Inputs

- Predicted fragment spectra files (text, TSV, or structured output from CFM-ID)
- Compound structure file (SDF format) containing DNA adduct compounds
- Compound identifier mapping (if predictions are indexed by different IDs than structures)

## Outputs

- Structured spectral database (relational table, indexed database, or online-accessible resource)
- Predicted-fragments database matching the format of the reference online resource
- Compilation metadata (timestamp, CFM-ID version, parameters used, record count)

## How to apply

Load all predicted fragment spectra output files generated by CFM-ID (or equivalent predictor) for each compound structure. Map each predicted spectrum to its corresponding input compound using a consistent compound identifier (e.g., from the SDF file). Normalize spectral data fields (m/z values, intensities, ionization level, mass range) to match the schema of the target online resource (e.g., column names, data types, units). Compile records into a structured format (e.g., relational database, indexed table) with consistent indexing on compound ID and spectral metadata. Validate completeness by confirming that every input compound has at least one corresponding predicted spectrum entry and that no orphaned spectra exist. Document the CFM-ID parameters used (ionization level, mass range) and the compilation timestamp as metadata.

## Related tools

- **CFM-ID** (Generates predicted fragment spectra from compound structures for input to the database compilation workflow)

## Evaluation signals

- All input compounds from the SDF file have exactly one corresponding entry in the compiled database (cardinality check: compound count in SDF = record count in database).
- Spectral fields (m/z, intensity, ionization level, mass range) conform to the target schema with no missing or malformed values.
- Compound identifiers are consistent between structure file and spectral database; cross-referencing by ID returns the correct spectrum.
- Database is queryable and returns spectra for representative test compounds; query latency is acceptable for the intended use case.
- Metadata fields (CFM-ID version, parameters, compilation date) are present and accurate.

## Limitations

- CFM-ID prediction accuracy varies by compound class and ionization mode; predicted spectra are approximations and must be validated against experimental data before use in production identification workflows.
- Compilation does not validate chemical correctness or biological relevance of the input compounds; garbage input compounds will produce garbage database entries.
- No changelog or version control mentioned in the source; lineage and reproducibility of database versions must be managed externally.

## Evidence

- [other] The in-silico fragment prediction stage uses CFM-ID to process SDF compound structures and generate predicted fragment spectra, with results deposited in the predicted fragments database.: "The in-silico fragment prediction stage uses CFM-ID to process SDF compound structures and generate predicted fragment spectra, with results deposited in the predicted fragments database."
- [other] Compile predicted fragment spectra into a structured database matching the format of the deposited predicted-fragments online resource.: "Compile predicted fragment spectra into a structured database matching the format of the deposited predicted-fragments online resource."
- [other] Validate output by confirming all input compounds have corresponding predicted spectra entries.: "Validate output by confirming all input compounds have corresponding predicted spectra entries."
- [intro] Multiple formats and access points are available for the DNA adductomics database: Excel, Word, online interactive versions, SDF compound files, experimental and predicted fragment databases: "Multiple formats and access points are available for the DNA adductomics database: Excel, Word, online interactive versions, SDF compound files, experimental and predicted fragment databases"
