cluster_selection: Selecting marker clusters according to filtering criteria

View source: R/cluster_selection.R

cluster_selectionR Documentation

Selecting marker clusters according to filtering criteria

Description

This function selects marker clusters to be used for haplotype generation. Clusters are selecte based on three different analysis criteria : high enough linkage disequilibrium between marker pairs (parameter ld_threshold), proximity between markers in a pair (parameter max_pair_distance), and proximity between markers and gene center position (parameter max_marker_distance).

Usage

cluster_selection(snp_data, center_pos, ld_threshold = 0.5,
  max_pair_distance = 10^10, max_marker_distance = 10^10)

Arguments

snp_data

A list describing snp_data and containing at least two items :

  • Markers A data.frame containing metadata regarding the markers to be selected, as output by functions read_hapmap and read_vcf .

  • LD A square matrix containing linkage disequilibrum measures (could be either R2, R2v, R2s or R2vs) between all gene pairs.

center_pos

A numeric of length one. The central position of the gene of interest.

ld_threshold

A numeric between 0 and 1. The minimum LD value to pass the filter. Defaults to 0.5.

max_pair_distance

A numeric of length one. The maximum distance (in base pairs) between two markers in a pair for markers in that pair to be selected.

max_marker_distance

A numeric of length one. The maximum distance (in base pairs) between the marker and the gene center for a marker to be selected.

Details

This function is meant for internal package use only. It is called by function haplo_selection in the final stage of marker selection.

Value

A list similar to that provided as input, but with a subset of markers that passed the filters.

Examples

NULL


malemay/HaplotypeMiner documentation built on Feb. 6, 2024, 3:29 a.m.