tracts.plot.plot_all_from_output_directories#

plot_all_from_output_directories(output_dirs, output_filename_format=None, log_scale=True, save_dir=None, sum_female_and_male_allosome_tracts=True, admixture_kwargs=None, migration_matrices_kwargs=None, tract_length_kwargs=None)#

Convenience wrapper around plot_admixture_from_output(), plot_migration_matrices_from_output() and plot_tract_length_distributions_from_output(), to re-produce all three sets of plots for a list of output directories (e.g. corresponding to different models or populations) in a single call.

Each of the three plot types can be customized independently, by passing that function’s keyword arguments through admixture_kwargs/migration_matrices_kwargs/tract_length_kwargs.

Parameters:
  • output_dirs (Iterable[str | Path]) – The output directories for which to (re-)produce plots.

  • output_filename_format (str | None) – See plot_admixture_from_output(). If None (default), it is auto-detected separately for each directory in output_dirs, so directories using different formats are supported. Pass an explicit value only if every directory in output_dirs shares that same format.

  • log_scale (bool) – See plot_tract_length_distributions_from_output().

  • save_dir (str | Path | None) – See plot_admixture_from_output(). Applied to every directory in output_dirs; since each output directory typically has its own output_filename_format prefix, plots from multiple runs can safely be collected into the same save_dir without overwriting each other.

  • sum_female_and_male_allosome_tracts (bool) – See plot_tract_length_distributions_from_output().

  • admixture_kwargs (dict | None) – Extra keyword arguments forwarded to plot_admixture_from_output() (e.g. title_fontsize, legend_fontsize) for every directory in output_dirs. Defaults to None (no overrides: each parameter keeps that function’s own default).

  • migration_matrices_kwargs (dict | None) – Extra keyword arguments forwarded to plot_migration_matrices_from_output() (e.g. title_mean, tick_fontsize) for every directory in output_dirs. Defaults to None.

  • tract_length_kwargs (dict | None) – Extra keyword arguments forwarded to plot_tract_length_distributions_from_output() (e.g. subtitle_fontsize, xlabel) for every directory in output_dirs. Defaults to None.

Return type:

None