Last week I published F4Mix, a tool for fitting modern and ancient DNA samples against a pool of source populations, usually ancient ones. F4Mix estimates, for each target, the non-negative mixture of reference populations whose covariance-aware f4 profile best matches it. This makes it useful for testing every sample against the same sources.

With a proper setup, the tool gives meaningful results, and can reveal both substructure and clear outliers within a site.

An example run: Neolithic F4Mix barplot for Corded Ware EBA, Sardinians, Orcadians, Icelandic, Greek and Sicilian samples

The files relevant for running F4Mix are run_model.py for setting up the model configuration, and optionally plot_weights.py for plotting the results. The dataset path and setup are hardcoded, and need to be adjusted directly in the files.

The core setup is similar to a qpAdm run: you define the dataset prefix (using the same formats supported by AdmixPy), the targets, the sources, the references (right groups), and an outgroup. The model fitting is done automatically.

The quality of results depends on the selected sources, the right groups (which should anchor ancestry axes for the sources), and the usable SNP count of each sample. Currently, the default warns when the minimum effective SNP count of any f4-statistic drops below 50,000. This does not necessarily mean that results below that threshold are unusable. Historical plausibility and the output metrics can be used to verify the results. The example run script also contains a section to exclude specific samples by their IIDs. Comment those lines out if the samples to exclude are not present in any population of the specific run.