This document provides code to calculate extended haplotype homozygosity (EHH), integrated haplotype score (iHS), and cross-population composite likelihood ratio (XP-CLR) from population genetics data. It loads example data, calculates EHH and iHS for a set of SNPs on chromosome 12, and plots the results. It then loads example results for composite likelihood ratio (CLR) between cattle populations and calculates relative extended haplotype homozygosity (REHH) between the populations, plotting the output. Finally, it calculates iHS for all SNPs on chromosome 1 from one of the cattle populations and plots those results.