Function to check whether a window is (loosely) homozygous or not
This is a core function. Parameters on how to consider a window homozygous are here (maxHet, maxMiss)
homoZygotTest(x, gaps, maxHet, maxMiss, maxGap, i, windowSize)
x
: vector of 0/1 genotypes (from genoConvert())gaps
: vector of differences between consecutive positions (gaps) in bpsmaxHet
: max n. of heterozygous SNP in a homozygous windowmaxMiss
: max n. of missing in a windowmaxGap
: max distance between consecutive SNP in a window to be still considered a potential runi
: index along the genome (genome-vector for each individual)windowSize
: 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
Useful links