matchms.yaml_file_functions module
- matchms.yaml_file_functions.load_workflow_from_yaml_file(yaml_file: str) OrderedDict[source]
Load a Pipeline workflow from YAML.
Expected keys are: - spectra_1_filters - spectra_2_filters - score_computations
For convenience, spectra_2_filters may be set to the string “processing_spectra_1” to reuse spectra_1_filters.
- matchms.yaml_file_functions.ordered_dump(data: OrderedDict, stream=None, dumper=<class 'yaml.dumper.SafeDumper'>, **kwds)[source]
Dump an OrderedDict to a YAML string, preserving the order of keys.
- matchms.yaml_file_functions.ordered_load(stream, loader=<class 'yaml.loader.SafeLoader'>, object_pairs_hook=<class 'collections.OrderedDict'>) OrderedDict[source]
Code from https://stackoverflow.com/questions/5121931/in-python-how-can-you-load-yaml-mappings-as-ordereddicts