1, Convert ibd to matrix, 2, How to statistically calculate the different length of IBD Distribution: such as these results: These results were used to generate four data sets based on the identified IBD blocks lengths: 1–5 cM, 5–10 cM, over 10 cM, and at least 2 cM. We used the first three data sets for analysis of the IBD sharing between populations by network visualization in ifferent time periods (Ralph and Coop 2013; Al-Asadi et al. 2019), while the last one was used to analyze overall IBD sharing between populations by heatmap and IBD sharing within each individual population