hdf5_writer
__all__
module-attribute
¶
write_channel_hdf5 ¶
write_channel_hdf5(
channel: ChannelChromatograms,
path: str | Path,
*,
overwrite: bool = False,
compression: str | None = None,
) -> Path
Write a single ChannelChromatograms object to a standalone HDF5 file.
Parameters:
-
channel(ChannelChromatograms) –The ChannelChromatograms object to write.
-
path(str | Path) –The path to the HDF5 file to write.
-
overwrite(bool, default:False) –If True, overwrite the file if it exists.
-
compression(str | None, default:None) –Dataset compression ("gzip", "lzf", or None).
Source code in src/chromstream/writers/hdf5_writer.py
write_chromatogram_hdf5 ¶
write_chromatogram_hdf5(
chromatogram: Chromatogram,
path: str | Path,
*,
injection_index: int | None = None,
overwrite: bool = False,
compression: str | None = None,
) -> Path
Write a single Chromatogram object to a standalone HDF5 file.
The full metadata dict is persisted so parsing restores it key-for-key.
Parameters:
-
chromatogram(Chromatogram) –The Chromatogram object to write.
-
path(str | Path) –The path to the HDF5 file to write.
-
injection_index(int | None, default:None) –Optional channel-level injection index to persist for lossless reassembly into an Experiment.
-
overwrite(bool, default:False) –If True, overwrite the file if it exists.
-
compression(str | None, default:None) –Dataset compression ("gzip", "lzf", or None).
Source code in src/chromstream/writers/hdf5_writer.py
write_experiment_hdf5 ¶
write_experiment_hdf5(
experiment: Experiment,
path: str | Path,
*,
overwrite: bool = False,
compression: str | None = None,
) -> Path
Write a single Experiment object to an HDF5 file. Assumptions: Col 0 is retention time, Col 1 is signal. All other columns are ignored.
Parameters:
-
experiment(Experiment) –The Experiment object to write.
-
path(str | Path) –The path to the HDF5 file to write.
-
overwrite(bool, default:False) –If True, overwrite the file if it exists.
-
compression(str | None, default:None) –The compression algorithm to use for datasets. Available options include "gzip", "lzf", or None for no compression. Compression can reduce file size but may increase read/write time.