Nothing
# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
#' Calculate IBD probabilities
#'
#' Calculate IBD probabilities for different types of populations.
#'
#' IBD probabilities can be calculated for many different types of populations.
#' In the following table all supported populations are listed. Note that the
#' value of x in the population types is variable, with its maximum value
#' depicted in the last column.
#'
#' | __Population type__ | __Cross__ | __Description__ | __max. x__ |
#' | ------ | ----------------- | -------------------------------------- | --- |
#' | DH | biparental | doubled haploid population | |
#' | Fx | biparental | Fx population (F1, followed by x-1 generations of selfing) | 8 |
#' | FxDH | biparental | Fx, followed by DH generation | 8 |
#' | BCx | biparental | backcross, second parent is recurrent parent | 9 |
#' | BCxDH | biparental | BCx, followed by DH generation | 9 |
#' | BC1Sx | biparental | BC1, followed by x generations of selfing | 7 |
#' | BC1SxDH | biparental | BC1, followed by x generations of selfing and DH | 6 |
#' | C3 | three-way | three way cross: (AxB) x C | |
#' | C3DH | three-way | C3, followed by DH generation | |
#' | C3Sx | three-way | C3, followed by x generations of selfing | 7 |
#' | C3SxDH | three-way | C3, followed by x generations of selfing and DH generation | 6 |
#' | C4 | four-way | four-way cross: (AxB) x (CxD) | |
#' | C4DH | four-way | C4, followed by DH generation | |
#' | C4Sx | four-way | C4, followed by x generations of selfing | 6 |
#' | C4SxDH | four-way | C4, followed by x generations of selfing and DH generation | 6 |
#'
#' @param popType A character string indicating the type of population. One of
#' DH, Fx, FxDH, BCx, BCxDH, BC1Sx, BC1SxDH, C3, C3DH, C3Sx, C3SxDH, C4, C4DH,
#' C4Sx, C4SxDH (see Details).
#' @param markerFile A character string indicating the location of the file with
#' genotypic information for the population. The file should be in
#' tab-delimited format with a header containing marker names.
#' @param mapFile A character string indicating the location of the map file
#' for the population. The file should be in tab-delimited format. It should
#' consist of exactly three columns, marker, chromosome and position. There
#' should be no header. The positions in the file should be in centimorgan.
#' @param evalPos A data.frame with evaluation positions to which the
#' calculations should be limited.
#' @param evalDist An optional numerical value indicating the maximum
#' distance for marker positions. Extra markers will be added based on the
#' value of \code{grid}.
#' @param grid Should the extra markers that are added to assure the a
#' maximum distince of \code{evalDist} be on a grid (\code{TRUE}) or in between
#' marker existing marker positions (\code{FALSE}).
#' @param verbose Should messages indicating the progress of the process be
#' printed?
#'
#' @return An object of class \code{IBDprob}, a \code{list} with five elements,
#' \describe{
#' \item{map}{a \code{data.frame} with chromosome and position of the markers.}
#' \item{markers}{a 3-dimensional \code{array} of IBD probabilities with
#' genotypes, markers and parents as array dimensions.}
#' \item{parents}{the parents.}
#' \item{popType}{the population type.}
#' }
#'
#' @examples
#' ## Compute IBD probabilities for Steptoe Morex.
#' SxMIBD <- calcIBD(popType = "DH",
#' markerFile = system.file("extdata/SxM", "SxM_geno.txt",
#' package = "statgenIBD"),
#' mapFile = system.file("extdata/SxM", "SxM_map.txt",
#' package = "statgenIBD"))
#'
#' ## Check summary.
#' summary(SxMIBD)
#'
#' ## Compute IBD probabilities for Steptoe Morex.
#' ## Add extra evaluation positions in between exiting marker positions
#' ## to assure evaluation positions are at most 5 cM apart.
#' SxMIBD_Ext <- calcIBD(popType = "DH",
#' markerFile = system.file("extdata/SxM", "SxM_geno.txt",
#' package = "statgenIBD"),
#' mapFile = system.file("extdata/SxM", "SxM_map.txt",
#' package = "statgenIBD"),
#' evalDist = 5)
#'
#' ## Check summary.
#' summary(SxMIBD_Ext)
#'
#' @export
calcIBD <- function(popType, markerFile, mapFile, evalPos = NULL, evalDist = NULL, grid = TRUE, verbose = FALSE) {
.Call(`_statgenIBD_calcIBD`, popType, markerFile, mapFile, evalPos, evalDist, grid, verbose)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.