Dataset Viewer
The dataset viewer is not available for this dataset.
Cannot get the config names for the dataset.
Error code:   ConfigNamesError
Exception:    RuntimeError
Message:      Dataset scripts are no longer supported, but found mscompress-test.py
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/src/worker/job_runners/dataset/config_names.py", line 66, in compute_config_names_response
                  config_names = get_dataset_config_names(
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/inspect.py", line 161, in get_dataset_config_names
                  dataset_module = dataset_module_factory(
                                   ^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/load.py", line 1031, in dataset_module_factory
                  raise e1 from None
                File "/usr/local/lib/python3.12/site-packages/datasets/load.py", line 989, in dataset_module_factory
                  raise RuntimeError(f"Dataset scripts are no longer supported, but found {filename}")
              RuntimeError: Dataset scripts are no longer supported, but found mscompress-test.py

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

My MSZ Dataset

A dataset containing mass spectrometry data in MSZ format.

Dataset Information

  • Format: MSZ (compressed mass spectrometry)
  • Number of files: 1
  • Granularity: spectrum-level
  • Filter: All MS levels

Files

  • test.msz

Usage

This dataset requires the mscompress library to load the MSZ files.

Installation

pip install mscompress

Loading the Dataset

from datasets import load_dataset

# Load the dataset
dataset = load_dataset("my-msz-dataset")

# Access spectra
for example in dataset["train"]:
    mz = example["mz"]
    intensity = example["intensity"]
    print(f"Spectrum {example['scan_number']}: {len(mz)} peaks")

Direct MSZ File Access

For more control, you can download and read the MSZ files directly:

import mscompress
from huggingface_hub import hf_hub_download

# Download an MSZ file
msz_path = hf_hub_download(
    repo_id="<repo_id>",
    filename="data/test.msz",
    repo_type="dataset"
)

# Read with mscompress
msz = mscompress.read(msz_path)

# Access spectra with random access
spectrum = msz.spectra[0]
print(f"m/z: {spectrum.mz}")
print(f"Intensity: {spectrum.intensity}")

Dataset Structure

Spectrum-level Features

  • source_file: Name of the source MSZ file
  • spectrum_index: Index of the spectrum in the file
  • scan_number: Scan number from the instrument
  • ms_level: MS level (1 for MS1, 2 for MS2/MS3, etc.)
  • retention_time: Retention time in seconds
  • num_peaks: Number of m/z-intensity pairs
  • mz: Array of m/z values
  • intensity: Array of intensity values

Citation

If you use this dataset, please cite the mscompress library:

@software{mscompress,
  title = {mscompress: High-performance compression for mass spectrometry data},
  url = {https://github.com/chrisagrams/mscompress}
}

License

Please check with the dataset creator for license information.

Downloads last month
8