tracts.driver_utils.InferenceConfig#
- class InferenceConfig(**data)#
Bases:
BaseModelConfiguration for the inference process. This determines the list of parameteres that can be processed from the driver file, together with their types and default values. Only parameters specified in this class will be processed and additional parameters in the driver file will rise an error. This is to ensure that the driver file is correctly specified and to provide clear error messages for missing or misspelled parameters. See online documentation for details on how to specify parameters in the driver file.
- unknown_labels_for_smoothing(List[str])#
- Type:
A list of population labels for which to apply smoothing to the tract length distribution. Defaults to an empty list.
- samples(SamplesConfig)#
- Type:
The configuration for the samples used in the inference.
- model_filename(str)#
- Type:
The filename of the demographic model to use for the inference.
- start_params(StartParamsConfig)#
- Type:
The configuration for the starting parameters used in the optimization.
- repetitions(int)#
- Type:
The number of repetitions to perform for the optimization. Defaults to 1.
- seed(int)#
- Type:
The random seed to use for the optimization.
- maximum_iterations(int | None)#
- Type:
The maximum number of iterations to perform for the optimization. Defaults to None, which means no limit on the number of iterations.
- npts(int)#
- Type:
The number of grid points to use to define the tract length histogram. Defaults to 50.
- exclude_tracts_below_cm(float)#
- Type:
The minimum tract length in centiMorgans to include in the analysis. Tracts shorter than this length will be excluded. Defaults to 1 cM.
- fix_parameters_from_ancestry_proportions(List[str])#
- Type:
A list of parameter names to fix based on the ancestry proportions. See online documentation for details.
- output_directory(str)#
- Type:
The directory where the output files will be saved.
- output_filename_format(str)#
- Type:
The format of the output filenames.
- log_filename(Optional[str])#
- Type:
The filename of the log file to write to. If None, no log file will be created. Defaults to “tracts.log”.
- ad_model_autosomes(str)#
- Type:
The admixture model to use for the autosomes. Must be one in [“M”, “DC”, “DF”, “H-DC”, “H-DF]. See online documentation for details. Defaults to “M”.
- ad_model_allosomes(str)#
- Type:
The admixture model to use for the allosomes. Must be one in [“DC”, “DF”, “H-DC”, “H-DF]. See online documentation for details. Defaults to “DC”.
- verbose_log(int)#
- Type:
The verbosity level for logging. Defaults to 20.
- verbose_screen(int)#
- Type:
The verbosity level for screen prints. Defaults to 20.
- log_scale(bool)#
- Type:
Whether to use log scale to plot the tract length distribution. Defaults to True.
- two_steps_optimization(bool)#
- Type:
Whether to perform a two-step optimization process, where the first step optimizes only the non-sex-bias parameters on autosomal data and the second step optimizes sex-bias parameters using both autosomal and allosomal data. Defaults to True.