calc_haplen: Calculate length of longest shared haplotypes around a focal...

Description Usage Arguments Details Value Examples

View source: R/calc_haplen.R

Description

Calculate for each chromosome the maximum length of its extended haplotype homozygosity.

Usage

1

Arguments

furcation

an object of class furcation calculated by calc_furcation.

Details

Extended haplotype homozygosity is defined as the region around a focal marker in which a particular chromosome shares a haplotype with (its sequence is identical to) another chromosome. The function calculates for each chromosome the boundaries of its longest shared haplotype. These correspond to the last furcations of a chromsome in a furcation diagram. Note that the calculation is performed independently upstream and downstream of the focal marker and hence upper and lower boundaries do not necessarily arise from the same chromosomal pair.

Value

The functions returns a list containing four elements:

mrk.name

name/identifier of the focal marker.

position

position of the focal marker.

xlim

positions of left- and rightmost markers covered by extended haplotypes.

haplen

a data frame with the coordinates of extended haplotypes around the focal marker.

Examples

1
2
3
4
5
6
7
8
9
#example haplohh object (280 haplotypes, 1424 SNPs)
#see ?haplohh_cgu_bta12 for details
data(haplohh_cgu_bta12)
#plotting haplotype lengths for both ancestral and derived allele
#of the marker "F1205400"
#which displays a strong signal of selection
f <- calc_furcation(haplohh_cgu_bta12, mrk = "F1205400")
h <- calc_haplen(f)
plot(h)

rehh documentation built on Sept. 15, 2021, 5:06 p.m.