phenopacket_mapper.preprocessing.preprocess_dict module

phenopacket_mapper.preprocessing.preprocess_dict.preprocess_dict(value: Any, mapping_dict: Dict) Any[source]

Takes a value and uses a mapping dictionary to preprocess it.

If the value is in the mapping dictionary, the corresponding value is returned. If the value is not in the mapping dictionary, the original value is returned.

Parameters:
  • value – The value to preprocess.

  • mapping_dict – A dictionary containing the mapping rules.

Returns:

The preprocessed value.