linkage
is used to calculate recombination frequency, LOD and phase within one type of marker or between two types of markers.
linkage(
dosage_matrix,
markertype1 = c(1, 0),
markertype2 = NULL,
parent1 = "P1",
parent2 = "P2",
which_parent = 1,
ploidy,
ploidy2 = NULL,
G2_test = FALSE,
convert_palindrome_markers = TRUE,
LOD_threshold = 0,
pairing = "random",
prefPars = c(0, 0),
combinations_per_iter = NULL,
iter_RAM = 500,
ncores = 1,
verbose = TRUE,
full_output = FALSE,
log = NULL
)
Returns a data.frame with columns:
first marker of comparison. If markertype2 is specified, it has the type of markertype1.
second marker of comparison. It has the type of markertype2 if specified.
(estimated) recombinations frequency
(estimated) LOD score
phase between markers
An integer matrix with markers in rows and individuals in columns.
A vector of length 2 specifying the first markertype to compare. The first element specifies the dosage in which_parent
(see below), the second in the other parent.
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 markertype1
.
The first element specifies the dosage in which_parent
(see below), the second in the other parent.
Character string specifying the name of parent1 as provided in the column-names of dosage_matrix. By default, "P1".
Character string specifying the other parent as provided in the column-names of dosage_matrix. By default, "P2".
Integer, either 1 or 2, with default 1, where 1 or 2 refers to parent1 or parent2 respectively. For example, if you wish to estimate linkage between markers with alleles that are polymorphic (i.e. segregating) and originates from parent1, then which_parent = 1. A bi-parental marker is a marker such as a 1x1 marker, so having a segregating allele in both parents. For linkage estimation between pairs of bi-parental markers, the result does not depend on this argument. For linkage estimation between e.g. a 1x0 and 1x1 marker, then which_parent should be 1. Similarly, to calculate linkage between 0x1 and 1x1 markers, which_parent should be 2.
Integer. The ploidy of the parent 1. If parent2 has the same ploidy level, then also the ploidy level of parent 2.
Integer, by default NULL
. If parental ploidies differ, use this to specify the ploidy of parent2.
Apply a G2 test (LOD of independence) in addition to the LOD of linkage.
Logical. Should markers that behave the same for both parents be converted to a workable format for that parent? E.g.: should 3.1 markers be converted to 1.3? If unsure, set to TRUE.
Minimum LOD score of linkages to report. Recommended to use for large number (> millions) of marker comparisons in order to reduce memory usage.
Type of chromosomal pairing behaviour during meiosis, either "random"
or "preferential"
. By default, random pairing is assumed (i.e. polysomic inheritance) is assumed. Note that this default does not affect
linkage estimation in a diploid, where pairing is arguably not random.
The estimates for preferential pairing parameters for the target and other parent, respectively, in range 0 <= p < 2/3. By default this is c(0,0) (so, no preferential pairing).
See the function test_prefpairing
and the vignette for more details.
Optional integer. Number of marker combinations per iteration.
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.
Number of cores to use. Works both for Windows and UNIX (using doParallel
). Use parallel::detectCores()
to find out how many cores you have available.
Should messages be sent to stdout?
Logical, by default FALSE
. If TRUE
, the complete output over all phases and showing marker combination counts is returned.
Character string specifying the log filename to which standard output should be written. If NULL log is send to stdout.
data("screened_data3")
SN_SN_P1 <- linkage(dosage_matrix = screened_data3,
markertype1 = c(1,0),
which_parent = 1,
ploidy = 4,
pairing = "random",
ncores = 1
)
Run the code above in your browser using DataLab