tracts.driver_utils.load_model_from_driver#
- load_model_from_driver(driver_spec, script_dir, driver_path, allosome_label=None)#
Loads the demographic model based on the specifications in the driver file. The model is expected to be defined in a separate yaml file, whose path is specified in the driver file under “model_filename”. See online documentation for details on how to specify the model yaml file and its contents.
- Parameters:
driver_spec (
InferenceConfig) – The configuration for the inference process, as specified in the driver file.script_dir (
str|Path|None) – The directory containing the script.driver_path (
str) – The path to the driver yaml file.allosome_label (
str|None) – The label of the allosome chromosome, if any. This is used to determine whether allosomal admixture is modelled.
- Returns:
The loaded demographic model, which can be either a ParametrizedDemography or a ParametrizedDemographySexBiased depending on whether allosomal admixture is modelled.
- Return type: