get_pairs_for_pairscan: Select marker pairs for pairscan

Description Usage Arguments Details Value Examples

View source: R/get_pairs_for_pairscan.R

Description

This function selects which marker pairs can be tested in the pair scan. Even if all markers are linearly independent, some marker pairs may have insufficient recombination between them to populate all genotype combinations. Marker pairs for which genotype combinations have insufficient numbers of individuals are not tested. This function determines which marker pairs have sufficient representation in all genotype combinations.

Usage

1
2
3
4
5
6
7
8
9
get_pairs_for_pairscan(
  gene,
  covar_names = NULL,
  max_pair_cor = NULL,
  min_per_genotype = NULL,
  run_parallel = FALSE,
  n_cores = 4,
  verbose = FALSE
)

Arguments

gene

A two dimensional genotype matrix with rows containing individuals and columns containing markers. Each entry is a value between 0 and 1 indicating the genotype of each individual at each marker.

covar_names

A character vector indicating which covariates should be tested.

max_pair_cor

A numeric value between 0 and 1 indicating the maximum Pearson correlation that two markers are allowed. If the correlation between a pair of markers exceeds this threshold, the pair is not tested. If this value is set to NULL, min_per_genotype must have a numeric value.

min_per_genotype

The minimum number of individuals allowable per genotype. If for a given marker pair, one of the genotypes is underrepresented, the marker pair is not tested. If this value is NULL, max_pair_cor must have a numeric value.

run_parallel

A logical value indicating whether multiple processors should be used.

n_cores

The number of cores to be used if run_parallel is TRUE

verbose

A logical value. If TRUE, the script prints a message to the screen to indicate that it is running. If FALSE, no message is printed.

Details

One and only one of min_per_genotype or max_pair_cor should be specified. We recommend that if you have continuous genotype probabilities, you use max_pair_cor. If both values are specified, this function will preferentially use max_pair_cor.

Value

This function returns a two-column matrix of marker pairs. This matrix is then used as an argument in one_pairscan_parallel, pairscan_null_kin, pairscan_null and pairscan to specify which marker pairs should be tested.

Examples

1
2
3
4
5
## Not run: 
gene <- data_obj$geno_for_pairscan
data_obj <- get_pairs_for_pairscan(gene)

## End(Not run)

cape documentation built on Feb. 10, 2021, 5:06 p.m.