Conditional Format Conversion for Mass Spectrometry Data
Summary
This skill conditionally serializes spectral library data from an in-memory representation into one of two distinct CSV schemas—Excalibur precursor lists for DDA on orbitrap or Skyline transition lists—based on user-selected format. It bridges the gap between a unified spectral library generation pipeline and instrument-specific data requirements.
When to use
You have generated a lipid spectral library (with lipid identities, adducts, m/z values, and fragmentation patterns) and need to export it for downstream mass spectrometry analysis on either an Orbitrap (via Excalibur DDA) or via Skyline's transition-based workflow. Use this skill when the same library must support multiple instrument/software workflows without re-running library generation.
When NOT to use
- Library data is already in MSP (NIST spectral library) format and must remain there; use MSP export instead of conditional CSV conversion.
- You need to export to a third instrument platform not supported by Excalibur or Skyline (e.g. SWATH-MS or ion mobility devices); extend the conditional logic first.
- Input spectral library has not yet been generated or lacks fragmentation patterns and m/z annotations; complete library generation before attempting format conversion.
Inputs
- In-memory lipid spectral library (lipid identities, adducts, precursor m/z, charge states, retention times, fragmentation patterns)
- User-selected format parameter (Excalibur or Skyline)
Outputs
- CSV file in Excalibur-compatible precursor list schema (precursor m/z, charge state, retention time, etc.)
- CSV file in Skyline-compatible transition list schema (precursor m/z, product ion m/z, transition metadata, etc.)
How to apply
Prompt the user to select a target format (Excalibur or Skyline) as an input parameter. Load the in-memory spectral library representation containing precursor m/z, charge states, retention times, and fragmentation patterns. For Excalibur format: extract precursor m/z, charge state, and retention time; serialize with Excalibur-required column headers and row structure. For Skyline format: extract precursor m/z, product ion m/z values, and transition-specific metadata; serialize with Skyline-required headers and transition list structure. Write the formatted CSV to file with a naming convention reflecting the selected format. The rationale is that each instrument expects a distinct tabular schema; conditional logic at serialization time avoids maintaining parallel library generation paths.
Related tools
- Excalibur (Target instrument software for DDA analysis on orbitrap; defines precursor list CSV schema (precursor m/z, charge state, retention time) consumed by this format.)
- Skyline (Target software for targeted proteomics/lipidomics; consumes transition list CSV schema (precursor m/z, product ion m/z, transition metadata) generated by this conditional format converter.)
- LSG (Upstream spectral library generator that produces the in-memory lipid library representation (lipid identities, adducts, m/z, fragmentation patterns) fed into this format conversion skill.) — https://github.com/98104781/LSG/releases/tag/v1.3.0
Evaluation signals
- CSV file contains all required columns for the selected format: Excalibur (precursor m/z, charge state, retention time) or Skyline (precursor m/z, product ion m/z, transition metadata).
- All rows in the output CSV correspond to entries in the source spectral library; no precursor m/z, charge state, or fragment ion values are missing or corrupted.
- CSV header row matches the instrument-specific schema (Excalibur or Skyline); a tool-agnostic CSV importer should fail on the wrong schema.
- File naming convention reflects the selected format (e.g. '_excalibur.csv' or '_skyline.csv').
- Spot-check: open output CSV in target software (Excalibur or Skyline) without parse errors; precursor/transition counts match library size.
Limitations
- The README does not specify the exact column headers or row structure required by Excalibur and Skyline; implementation must be validated against official schema documentation for each tool.
- Conditional logic is binary (Excalibur vs. Skyline); adding support for a third format requires code modification and re-release.
- Fragmentation patterns are lossy in CSV format (transition lists flatten spectral peaks); full spectrum information is only preserved in MSP export.
- Retention time data may be absent or approximate in early library versions; Skyline transition lists may not include reliable iRT or RT calibration.
Evidence
- [other] User-selected format determines CSV schema: "Accept user format selection (Excalibur or Skyline) as input parameter."
- [other] Excalibur format structure: "For Excalibur format: extract precursor m/z, charge state, and retention time; serialize as CSV with Excalibur-required column headers and row structure."
- [other] Skyline format structure: "For Skyline format: extract precursor m/z, product ion m/z values, and transition-specific metadata; serialize as CSV with Skyline-required column headers and transition list structure."
- [readme] CSV export as alternative to MSP: "Spectral libraries can be exported with the file extension '.MSP' selected. Otherwise, an Excalibur compatible precursor list (for DDA analysis via orbitrap) or Skylike compatible transition list may"
- [readme] Instrument-specific use case: "Excalibur compatible precursor list (for DDA analysis via orbitrap)"
1---2name: format-conversion-conditional-logic3description: Use when you have generated a lipid spectral library (with lipid identities, adducts, m/z values, and fragmentation patterns) and need to export it for downstream mass spectrometry analysis on either an Orbitrap (via Excalibur DDA) or via Skyline's transition-based workflow.4license: CC-BY-4.05---67# Conditional Format Conversion for Mass Spectrometry Data89## Summary1011This skill conditionally serializes spectral library data from an in-memory representation into one of two distinct CSV schemas—Excalibur precursor lists for DDA on orbitrap or Skyline transition lists—based on user-selected format. It bridges the gap between a unified spectral library generation pipeline and instrument-specific data requirements.1213## When to use1415You have generated a lipid spectral library (with lipid identities, adducts, m/z values, and fragmentation patterns) and need to export it for downstream mass spectrometry analysis on either an Orbitrap (via Excalibur DDA) or via Skyline's transition-based workflow. Use this skill when the same library must support multiple instrument/software workflows without re-running library generation.1617## When NOT to use1819- Library data is already in MSP (NIST spectral library) format and must remain there; use MSP export instead of conditional CSV conversion.20- You need to export to a third instrument platform not supported by Excalibur or Skyline (e.g. SWATH-MS or ion mobility devices); extend the conditional logic first.21- Input spectral library has not yet been generated or lacks fragmentation patterns and m/z annotations; complete library generation before attempting format conversion.2223## Inputs2425- In-memory lipid spectral library (lipid identities, adducts, precursor m/z, charge states, retention times, fragmentation patterns)26- User-selected format parameter (Excalibur or Skyline)2728## Outputs2930- CSV file in Excalibur-compatible precursor list schema (precursor m/z, charge state, retention time, etc.)31- CSV file in Skyline-compatible transition list schema (precursor m/z, product ion m/z, transition metadata, etc.)3233## How to apply3435Prompt the user to select a target format (Excalibur or Skyline) as an input parameter. Load the in-memory spectral library representation containing precursor m/z, charge states, retention times, and fragmentation patterns. For Excalibur format: extract precursor m/z, charge state, and retention time; serialize with Excalibur-required column headers and row structure. For Skyline format: extract precursor m/z, product ion m/z values, and transition-specific metadata; serialize with Skyline-required headers and transition list structure. Write the formatted CSV to file with a naming convention reflecting the selected format. The rationale is that each instrument expects a distinct tabular schema; conditional logic at serialization time avoids maintaining parallel library generation paths.3637## Related tools3839- **Excalibur** (Target instrument software for DDA analysis on orbitrap; defines precursor list CSV schema (precursor m/z, charge state, retention time) consumed by this format.)40- **Skyline** (Target software for targeted proteomics/lipidomics; consumes transition list CSV schema (precursor m/z, product ion m/z, transition metadata) generated by this conditional format converter.)41- **LSG** (Upstream spectral library generator that produces the in-memory lipid library representation (lipid identities, adducts, m/z, fragmentation patterns) fed into this format conversion skill.) — https://github.com/98104781/LSG/releases/tag/v1.3.04243## Evaluation signals4445- CSV file contains all required columns for the selected format: Excalibur (precursor m/z, charge state, retention time) or Skyline (precursor m/z, product ion m/z, transition metadata).46- All rows in the output CSV correspond to entries in the source spectral library; no precursor m/z, charge state, or fragment ion values are missing or corrupted.47- CSV header row matches the instrument-specific schema (Excalibur or Skyline); a tool-agnostic CSV importer should fail on the wrong schema.48- File naming convention reflects the selected format (e.g. '_excalibur.csv' or '_skyline.csv').49- Spot-check: open output CSV in target software (Excalibur or Skyline) without parse errors; precursor/transition counts match library size.5051## Limitations5253- The README does not specify the exact column headers or row structure required by Excalibur and Skyline; implementation must be validated against official schema documentation for each tool.54- Conditional logic is binary (Excalibur vs. Skyline); adding support for a third format requires code modification and re-release.55- Fragmentation patterns are lossy in CSV format (transition lists flatten spectral peaks); full spectrum information is only preserved in MSP export.56- Retention time data may be absent or approximate in early library versions; Skyline transition lists may not include reliable iRT or RT calibration.5758## Evidence5960- [other] User-selected format determines CSV schema: "Accept user format selection (Excalibur or Skyline) as input parameter."61- [other] Excalibur format structure: "For Excalibur format: extract precursor m/z, charge state, and retention time; serialize as CSV with Excalibur-required column headers and row structure."62- [other] Skyline format structure: "For Skyline format: extract precursor m/z, product ion m/z values, and transition-specific metadata; serialize as CSV with Skyline-required column headers and transition list structure."63- [readme] CSV export as alternative to MSP: "Spectral libraries can be exported with the file extension '.MSP' selected. Otherwise, an Excalibur compatible precursor list (for DDA analysis via orbitrap) or Skylike compatible transition list may"64- [readme] Instrument-specific use case: "Excalibur compatible precursor list (for DDA analysis via orbitrap)"