Description Usage Arguments Details Value Author(s) See Also Examples
Create a matrix of combinations between loci for which linkage disequilibrium (LD) should be computed.
Combinations among loci with minimum and maximum distance.
Combinations among adjacent (neighboring) loci.
Combinations among all loci.
Combinations among nearest loci.
Combinations among nearest loci.
Combinations among all loci of two sets.
Combinations among different sets of loci with minimum and maximum distance.
Combinations between flaning loci.
Combinations among loci in a sliding window.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | comb_wind(pos, min_dist, max_dist)
comb_adj(pos)
comb_all(pos)
comb_nearest(indices, indices2, pos, pos2)
comb_nearest_k(indices, indices2, pos, pos2, k)
comb_all_sets(indices, indices2, pos, pos2)
comb_wind_sets(indices, indices2, pos, pos2, min_dist, max_dist)
comb_flank(indices, indices2, pos, pos2)
comb_sliding(pos, start, width, advance)
|
pos |
An increasingly sorted numeric vector. The positions of the loci. |
min_dist |
A numeric vector. The minimum distances between loci. Each entry must be positive. |
max_dist |
A numeric vector. The maximum distances between loci. |
indices |
An integer vector. A vector with the indices of the loci. |
indices2 |
An integer vector. A vector with the indices of a second set of loci. |
pos2 |
An increasingly numeric vector. The positions of a second set of loci. |
k |
An integer. The number of nearest loci to be considered. |
start |
A double. Specifies where to start with the sliding window. |
width |
A double. Width of the sliding window. |
advance |
A double. Increment of the sliding window. |
The purpose of these functions is to provide a convenient way to obtain all desired combinations of loci for computation of LD between them. Here is an overview of their functionality:
comb_all: Combinations of all loci.
comb_adj: Combinations of adjacent (neighboring) loci.
comb_nearest: Combinations of a set of loci and its closest pendant in another set.
comb_nearest_k: Combinations of a set of loci and its closest k pendant in another set.
comb_flank: Combinations between flanking loci.
comb_wind: Combinations of loci with a given minimum and maximum distance.
comb_sliding: Combinations of loci within an advancing sliding window.
In general, these functions all return a matrix with three columns.
The first two columns refer to the indices of the pair of loci, while the
third column indicates to which group of combinations the pair belongs.
Currently, the assigned groups only vary for comb_sliding
,
where the group indicates to which window the pair of loci belongs.
The returned matrix is suitable as input for the function
LD_mult
for efficient computation of LD.
A numeric matrix.
Dominik Mueller (dominikmueller64@yahoo.de)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | pos <- sort(runif(10))
comb_wind(pos, min_dist = c(0.1, 0.3, 0.8), max_dist = c(0.2, 0.7, 0.9))
comb_adj(pos)
comb_all(pos)
pos2 <- sort(runif(10L, min = 0, max = max(pos)))
indices1 <- which(sort(c(pos, pos2)) %in% pos)
indices2 <- which(sort(c(pos, pos2)) %in% pos2)
comb_nearest(indices1, indices2, pos, pos2)
comb_nearest_k(indices1, indices2, pos, pos2, 3)
comb_all_sets(indices1, indices2, pos, pos2)
comb_wind_sets(indices1, indices2, pos, pos2,
min_dist = c(0.1, 0.3, 0.8), max_dist = c(0.2, 0.7, 0.9))
comb_flank(indices1, indices2, pos, pos2)
comb_sliding(pos, 0, 0.2, 0.1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.