Description Usage Arguments Details Value See Also Examples

View source: R/calc_pairwise_haplen.R

Calculate pairwise shared haplotype length between all chromosomes at a focal marker.

1 2 3 4 5 6 7 8 | ```
calc_pairwise_haplen(
haplohh,
mrk,
phased = TRUE,
maxgap = NA,
max_extend = NA,
side = "both"
)
``` |

`haplohh` |
an object of class |

`mrk` |
integer representing the number of the focal marker within the haplohh object or string representing its ID/name. |

`phased` |
logical. If |

`maxgap` |
maximum allowed gap in bp between two markers. If exceeded, further calculation is stopped at the gap
(default= |

`max_extend` |
maximum distance in bp to extend shared haplotypes away from the focal marker.
(default |

`side` |
side to consider, either "left" (positions lower than focal position), "right" (positions higher than focal position) or "both" (default). |

The function computes the length of shared haplotypes (stretches of identical sequence) around the focal marker.

Note that the function `calc_haplen`

calculates for each chromosome
the boundaries of its longest shared haplotype; separately upstream and downstream of
the focal marker.

The returned value is a matrix with pairwise shared haplotype lengths.

1 2 3 4 5 6 | ```
#example haplohh object (280 haplotypes, 1424 SNPs)
#see ?haplohh_cgu_bta12 for details
data(haplohh_cgu_bta12)
#computing shared haplotype lengths around the marker "F1205400"
#which displays a strong signal of selection
m <- calc_pairwise_haplen(haplohh_cgu_bta12, mrk = "F1205400")
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.