linkage.gp {polymapR} | R Documentation |
Calculate recombination frequency, LOD and phase using genotype probabilities
Description
linkage.gp
is used to calculate recombination frequency, LOD and phase within one type of marker or between two types of markers.
Usage
linkage.gp(
probgeno_df,
chk,
pardose = NULL,
markertype1 = c(1, 0),
markertype2 = NULL,
target_parent = match.arg(c("P1", "P2")),
G2_test = FALSE,
LOD_threshold = 0,
prefPars = c(0, 0),
combinations_per_iter = NULL,
iter_RAM = 500,
ncores = 2,
verbose = TRUE,
check_qall_mult = FALSE,
method = "approx",
log = NULL
)
Arguments
probgeno_df |
A data frame as read from the scores file produced by function
|
chk |
Output list as returned by function |
pardose |
Option to include the most likely (discrete) parental dosage scores, used mainly for internal calls of this function. By default |
markertype1 |
A vector of length 2 specifying the first markertype to compare. The first element specifies the dosage in |
markertype2 |
A vector of length 2 specifying the first markertype to compare. This argument is optional. If not specified, the function will calculate
linkage within the markertype as specified by |
target_parent |
Which parent is being targeted (only acceptable options are "P1" or "P2"), ie. which parent is of specific interest?
If this is the maternal parent, please specify as "P1". If the paternal parent, please use "P2". The actual identifiers of the two parents are
entered using the arguments |
G2_test |
Apply a G2 test (LOD of independence) in addition to the LOD of linkage. |
LOD_threshold |
Minimum LOD score of linkages to report. Recommended to use for large number (> millions) of marker comparisons in order to reduce memory usage. |
prefPars |
The estimates for preferential pairing parameters for parent 1 and 2, in range 0 <= p < 2/3. By default this is c(0,0) (so, no preferential pairing).
See the function |
combinations_per_iter |
Optional integer. Number of marker combinations per iteration. |
iter_RAM |
A (very) conservative estimate of working memory in megabytes used per core. It only takes the size frequency matrices into account. Actual usage is more, especially with large number of linkages that are reported. Reduce memory usage by using a higher LOD_threshold. |
ncores |
Number of cores to use. Works both for Windows and UNIX (using |
verbose |
Should messages be sent to stdout? |
check_qall_mult |
Check the |
method |
Either |
log |
Character string specifying the log filename to which standard output should be written. If NULL log is send to stdout. |
Value
Returns a data.frame with columns:
- marker_a:
-
first marker of comparison. If markertype2 is specified, it has the type of markertype1.
- marker_b:
-
second marker of comparison. It has the type of markertype2 if specified.
- r:
-
recombination frequency
- LOD:
-
LOD score associated with r
- phase:
-
phase between markers
Examples
data("gp_df","chk1")
SN_SN_P1.gp <- linkage.gp(probgeno_df = gp_df,
chk = chk1,
markertype1 = c(1,0),
target_parent = "P1")