This function uses a QTL-mapping style approach to add extra markers to an existing map. The code uses the imputation data at a collection of points, and the marker alleles for the first marker of the extra markers. If the imputed genotype at a point is independent from the genotype at the new marker, then the new marker probably should not be mapped to that point. If the imputed genotype at a point and the marker allele are strongly dependent, then the new marker should probably be mapped to that point. Dependence and independence are measured using a chi-squared test stastistic for independence. All the extra markers are then mapped to the position where the test statistic is largest. It is recommended that only single markers be added at a time, unless you are extremely confident that all the extra markers should be located at the same position.
Currently the set of points at which the new markers are considered for addition is the set of points at which imputation data is available, which are not markers. The intention is that this set of points should be an equally spaced grid of points; this reduced the number of tests that are performed, as generally there are far fewer points in the grid, than there are markers. After the new marker is added, local reordering will need to be performed anyway, making any loss in accuracy by using the grid of points largely irrelevant. In future it may be possible to use the set of all marker positions as the set of points at which tests are performed, by setting useOnlyExtraImputationPoints to FALSE.
Once the extra markers have added, local reordering is optionally performed, depending on argument reordering. The radius of the region on which reordering is performed, in terms of the number of markers, is reorderRadius.
Once the optional reordering step has been performed, the map is recomputed locally, to account for the addition of the extra markers. The argument maxOffset is passed through to estimateMap. Finally, the imputation data will be recomputed if imputationArgs is not NULL; in that case, imputationArgs should contain a list of arguments to imputeFounders. It is recommended that the imputation data be recomputed if further markers are to be added.
In some cases the user will want to apply a threshold to the maximum value of the test statistics, and only add the marker if the test statistics exceed the threshold. In this case the function should be called twice. For the first call, onlyStatistics should be set to FALSE. If the resulting test statistics exceed the threshold, then addExtrMarkers should be called again with onlyStatistics set to TRUE.