{'fraction_non_alphanumeric': 0.023876404494382022, 'fraction_numerical': 0.0007022471910112359, 'mean_word_length': 5.536697247706422, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Unsupervised detection of ancestry tracks with the GHap r package

The identification of ancestry tracks is a powerful tool to assist the inference of evolutionary events in the genomes of animals and plants. However, algorithms for ancestry track detection typically require labelled reference population data. This dependency prevents the analysis of genomic data lacking prior information on genetic structure, and may produce classification bias when samples in the reference data are inadvertently admixed. We combined heuristics with K‐means clustering to deploy a method that can detect ancestry tracks without the provision of lineage labels for reference population data. The resulting algorithm uses phased genotypes to infer individual ancestry proportions and local ancestry. By piling up ancestry tracks across individuals, our method also allows for mapping loci with excess or deficit ancestry from specific lineages. Using both simulated and real genomic data, we found that the proposed method was accurate in inferring genetic structure, assigning chromosomal segments to lineages and estimating individual ancestry, especially in cases where ancestry tracks resulted from recent admixture of highly divergent lineages. The method is implemented as part of the v2 release of the GHap r package (available at https://cran.r‐project.org/package=GHap and https://bitbucket.org/marcomilanesi/ghap/src/master/).