This is a core function within the sliding-window workflow. Parameters on how to consider a window heterozygous are here (maxHom, maxMiss)
heteroZygotTest(x, gaps, maxHom, maxMiss, maxGap, i, windowSize)vector of 0/1 genotypes (from genoConvert())
vector of differences between consecutive positions (gaps) in bps
max n. of homozygous SNP in a heterozygous window
max n. of missing in a window
max distance between consecutive SNP in a window to be still considered a potential run
index along the genome (genome-vector for each individual)
size of window (n. of SNP)
a list: i) TRUE/FALSE (whether a window is heterozygous or NOT); ii) indexes of "opposite and missing" genotype