Description Usage Arguments Value Examples
View source: R/all_functions.R
Given an input set of genotypes from the generate.genotype() function, this function will generate LD blocks based on average LD between all members in each block, using r2 metric of LD. Scanning linearly over the genotype file from the first row, genotypes will be contiously added to blocks as long as the average of all pairwise r2 values of the genotypes in the block are above threshold. When the values goes below the threshold, the last genotype tested will be the base of a new block. For each block the variant with the highest average pairwise r2 value in block will be selected as a tagging genotype.
1 | LD_blocks(genotype,threshold=0.9,max_block_size=1000)
|
genotype |
A genotype matrix from generate.genotype() |
threshold |
The threshold used for generating blocks, indicating the minimum average pairwise r2 value allowed. |
max_block_size |
The maximum block size allowed. |
Returns a named list with the following objects:
The tagging genotypes selected from the blocks
The genotype selected to represent each block. The median genotype, rounded down is selected
A matrix indicating which block each genotype belongs to
Returns a named list with the following objects:
1 | LD_blocks(genotype,threshold,max_blocksize)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.