Tabular Data Field Comparison
Summary
Compare structured tabular outputs (CSV, Parquet) exported from independent implementations of the same file reader to detect field-level discrepancies in names, types, row counts, and numerical values. This skill validates implementation interoperability and identifies divergences in data interpretation across language/library variants.
When to use
Apply this skill when you have multiple independent implementations of the same data format reader (e.g., Rust, Python, R versions) and need to verify they produce identical or equivalent output. Use it to validate that a newly written reader implementation (in one language) produces the same spectrum table structure and numerical content as an existing trusted implementation.
When NOT to use
- Input is a single implementation or vendor output; comparison requires at least two independent readers.
- Field definitions or data types are intentionally different across implementations by design (e.g., different precision levels for intentional lossy compression).
- Input file format is already validated or certified by a reference standard; this skill is for early-stage interoperability testing, not final certification.
Inputs
- mzPeak file (ZIP archive containing Parquet files)
- Three or more independent reader implementations (Rust library, Python pyarrow implementation, R arrow implementation)
Outputs
- CSV export of spectrum metadata table from each implementation
- CSV export of spectrum signal data table from each implementation
- Consistency report documenting field-level agreement and discrepancies
- Validation status summary (pass/fail per implementation pair)
How to apply
Load the same input file (e.g., an mzPeak archive) sequentially using each independent implementation—Rust, Python/pyarrow, and R/arrow—and export the resulting spectrum metadata or signal tables to CSV format for easy textual comparison. Compare the three CSV outputs systematically: first check schema agreement (field names, declared data types, row counts match), then validate numerical equality field-by-field, paying attention to floating-point precision and integer representation. Generate a structured consistency report documenting which fields agree, which diverge, and whether divergences are due to implementation bugs, format interpretation differences, or acceptable numerical tolerances. Use field-level agreement as the primary validation criterion, since row count and schema matching alone are insufficient to confirm correctness.
Related tools
Evaluation signals
- Field names match exactly across all three CSV exports (including order and case sensitivity).
- Data types inferred from CSV content (integer, float, string, null) agree across implementations for each column.
- Row counts are identical across all three CSV outputs.
- Numerical values in floating-point columns agree within an acceptable precision tolerance (e.g., within machine epsilon or a domain-specific threshold like 1e-6 relative error).
- No spurious nulls or NaN values appear in one implementation but not others (unless intentional per format design, such as null marking for zero-run-stripped regions).
Limitations
- The mzPeak format is work-in-progress with no stability guarantee at this point; field definitions or semantics may change.
- Python and R implementations support reading only; if testing write capability, only Rust can produce reference outputs.
- Floating-point precision differences (e.g., f32 vs. f64 representation) may introduce small numerical divergences that are valid but require tolerance tuning.
- The skill does not validate semantic correctness (e.g., whether a m/z value makes physical sense); it only checks consistency across implementations.
Evidence
- [other] Do the Rust, Python/pyarrow, and R/arrow implementations of mzPeak file readers produce field-level agreement when loading the same input file?: "Do the Rust, Python/pyarrow, and R/arrow implementations of mzPeak file readers produce field-level agreement when loading the same input file?"
- [other] Compare the three CSV outputs field-by-field to identify any discrepancies in field names, data types, row counts, and numerical values.: "Compare the three CSV outputs field-by-field to identify any discrepancies in field names, data types, row counts, and numerical values."
- [other] Three independent mzPeak reader implementations exist: a Rust library, a Python implementation using pyarrow, and an R implementation using arrow, all capable of reading mzPeak files.: "Three independent mzPeak reader implementations exist: a Rust library, a Python implementation using pyarrow, and an R implementation using arrow, all capable of reading mzPeak files."
- [readme] The primary work shown here is written in Rust at the repository root, including a library for reading and writing mzPeak files, as well as command line tools for converting existing formats into mzPeak.: "The primary work shown here is written in Rust at the repository root, including a library for reading and writing mzPeak files, as well as command line tools for converting existing formats into"
- [readme] There is a separate Python implementation in
python/ which is a complete re-implementation for reading mzPeak files using pyarrow, and the PyData stack.: "There is a separate Python implementation in python/ which is a complete re-implementation for reading mzPeak files using [pyarrow]"
1---2name: tabular-data-field-comparison3description: Use when you have multiple independent implementations of the same data format reader (e.g., Rust, Python, R versions) and need to verify they produce identical or equivalent output.4license: CC-BY-4.05---67# Tabular Data Field Comparison89## Summary1011Compare structured tabular outputs (CSV, Parquet) exported from independent implementations of the same file reader to detect field-level discrepancies in names, types, row counts, and numerical values. This skill validates implementation interoperability and identifies divergences in data interpretation across language/library variants.1213## When to use1415Apply this skill when you have multiple independent implementations of the same data format reader (e.g., Rust, Python, R versions) and need to verify they produce identical or equivalent output. Use it to validate that a newly written reader implementation (in one language) produces the same spectrum table structure and numerical content as an existing trusted implementation.1617## When NOT to use1819- Input is a single implementation or vendor output; comparison requires at least two independent readers.20- Field definitions or data types are intentionally different across implementations by design (e.g., different precision levels for intentional lossy compression).21- Input file format is already validated or certified by a reference standard; this skill is for early-stage interoperability testing, not final certification.2223## Inputs2425- mzPeak file (ZIP archive containing Parquet files)26- Three or more independent reader implementations (Rust library, Python pyarrow implementation, R arrow implementation)2728## Outputs2930- CSV export of spectrum metadata table from each implementation31- CSV export of spectrum signal data table from each implementation32- Consistency report documenting field-level agreement and discrepancies33- Validation status summary (pass/fail per implementation pair)3435## How to apply3637Load the same input file (e.g., an mzPeak archive) sequentially using each independent implementation—Rust, Python/pyarrow, and R/arrow—and export the resulting spectrum metadata or signal tables to CSV format for easy textual comparison. Compare the three CSV outputs systematically: first check schema agreement (field names, declared data types, row counts match), then validate numerical equality field-by-field, paying attention to floating-point precision and integer representation. Generate a structured consistency report documenting which fields agree, which diverge, and whether divergences are due to implementation bugs, format interpretation differences, or acceptable numerical tolerances. Use field-level agreement as the primary validation criterion, since row count and schema matching alone are insufficient to confirm correctness.3839## Related tools4041- **Rust mzPeak library** (Primary read/write implementation used to load test file and export reference spectrum table) — https://github.com/HUPO-PSI/mzPeak42- **pyarrow** (Python Parquet reader for loading mzPeak table files and exporting to CSV) — https://arrow.apache.org/docs/python/index.html43- **R arrow** (R Parquet reader for loading mzPeak table files and exporting to CSV) — https://arrow.apache.org/docs/r/44- **OpenMS** (Reference mass spectrometry toolkit; mzPeak name held in trust by OpenMS Inc.)4546## Evaluation signals4748- Field names match exactly across all three CSV exports (including order and case sensitivity).49- Data types inferred from CSV content (integer, float, string, null) agree across implementations for each column.50- Row counts are identical across all three CSV outputs.51- Numerical values in floating-point columns agree within an acceptable precision tolerance (e.g., within machine epsilon or a domain-specific threshold like 1e-6 relative error).52- No spurious nulls or NaN values appear in one implementation but not others (unless intentional per format design, such as null marking for zero-run-stripped regions).5354## Limitations5556- The mzPeak format is work-in-progress with no stability guarantee at this point; field definitions or semantics may change.57- Python and R implementations support reading only; if testing write capability, only Rust can produce reference outputs.58- Floating-point precision differences (e.g., f32 vs. f64 representation) may introduce small numerical divergences that are valid but require tolerance tuning.59- The skill does not validate semantic correctness (e.g., whether a m/z value makes physical sense); it only checks consistency across implementations.6061## Evidence6263- [other] Do the Rust, Python/pyarrow, and R/arrow implementations of mzPeak file readers produce field-level agreement when loading the same input file?: "Do the Rust, Python/pyarrow, and R/arrow implementations of mzPeak file readers produce field-level agreement when loading the same input file?"64- [other] Compare the three CSV outputs field-by-field to identify any discrepancies in field names, data types, row counts, and numerical values.: "Compare the three CSV outputs field-by-field to identify any discrepancies in field names, data types, row counts, and numerical values."65- [other] Three independent mzPeak reader implementations exist: a Rust library, a Python implementation using pyarrow, and an R implementation using arrow, all capable of reading mzPeak files.: "Three independent mzPeak reader implementations exist: a Rust library, a Python implementation using pyarrow, and an R implementation using arrow, all capable of reading mzPeak files."66- [readme] The primary work shown here is written in Rust at the repository root, including a library for reading and writing mzPeak files, as well as command line tools for converting existing formats into mzPeak.: "The primary work shown here is written in Rust at the repository root, including a library for reading and writing mzPeak files, as well as command line tools for converting existing formats into"67- [readme] There is a separate Python implementation in `python/` which is a complete re-implementation for _reading_ mzPeak files using [`pyarrow`](https://arrow.apache.org/docs/python/index.html), and the PyData stack.: "There is a separate Python implementation in `python/` which is a complete re-implementation for _reading_ mzPeak files using [`pyarrow`]"