tracts.driver_utils.ModelReloadContext#
- class ModelReloadContext(script_dir, driver_path, allosome_label, autosome_proportions, allosome_proportions)#
Bases:
objectBundles the file-location and ancestry-proportion context needed to reload a demographic model from its driver/model YAML files (e.g. when the implicit population changes and the founder-event structure has to be re-parsed), so that functions needing this context take one parameter instead of five.
- script_dir#
The directory containing the script.
- Type:
str
- driver_path#
The path to the driver file.
- Type:
str
- allosome_label#
The label used for allosomal data, as returned by
get_admixture_models.- Type:
str | None
- autosome_proportions#
Observed autosomal ancestry proportions, as returned by
get_ancestry_proportions.- Type:
dict
- allosome_proportions#
Observed allosomal ancestry proportions, as returned by
get_ancestry_proportions.- Type:
dict
- allosome_label: str | None#
- allosome_proportions: dict#
- autosome_proportions: dict#
- driver_path: str#
- script_dir: str#