consecutiveRunsCpp {detectRUNS} | R Documentation |
Function to detect consecutive runs in a vector (individual's genotypes)
Description
This is a core function. It implements the consecutive method for detection of runs in diploid genomes (see Marras et al. 2015)
Usage
consecutiveRunsCpp(indGeno, individual, mapFile, ROHet = TRUE,
minSNP = 3L, maxOppositeGenotype = 1L, maxMiss = 1L,
minLengthBps = 1000L, maxGap = 1000000L)
Arguments
indGeno |
vector of 0/1/NAs of individual genotypes (0: homozygote; 1: heterozygote) |
individual |
list of group (breed, population, case/control etc.) and ID of individual sample |
mapFile |
Plink map file (for SNP position) |
ROHet |
shall we detect ROHet or ROHom? |
minSNP |
minimum number of SNP in a run |
maxOppositeGenotype |
max n. of homozygous/heterozygous SNP |
maxMiss |
max. n. of missing SNP |
minLengthBps |
min length of a run in bps |
maxGap |
max distance between consecutive SNP in a window to be still considered a potential run |
Details
The consecutive method detect runs by consecutively scanning SNP loci along the genome. No sliding windows are used. Checks on minimum n. of SNP, max n. of opposite and missing genotypes, max gap between adjacent loci and minimum length of the run are implemented (as in the sliding window method). Both runs of homozygosity (RoHom) and of heterozygosity (RoHet) can be search for (option ROHet: TRUE/FALSE)
Value
A data frame of runs per individual sample