one_pairscan_parallel: This is an internal function to run a single pairscan It is...

Description Usage Arguments Value

View source: R/one_pairscan_parallel.R

Description

This is an internal function to run a single pairscan It is used both to do the actual pairscan (pairscan_kin and pairscan_noKin), as well as to do the permutations of the pairscan pairscan_null).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
one_pairscan_parallel(
  data_obj,
  phenotype_vector,
  genotype_matrix,
  int = NULL,
  covar_vector = NULL,
  paired_markers,
  n_perm = 0,
  run_parallel = FALSE,
  verbose = FALSE,
  n_cores = 4
)

Arguments

data_obj

a Cape object

phenotype_vector

A vector of trait values

genotype_matrix

A matrix of genotypes for markers to be tested

int

the interaction term added to the linear model when the kinship correction is being used. This term is calculated in pairscan_kin.

covar_vector

a vector or matrix of covariates to be used.

paired_markers

a two-column matrix indicating which marker pairs should be tested. The pairs are assigned in pairscan by get_pairs_for_pairscan. They are checked for pairwise correlations before being sent to the pairscan.

n_perm

the number of permutations to be performed.

run_parallel

a logical value indicating whether to use parallel computing

verbose

a logical value indicating whether progress should be printed to the screen.

n_cores

the number of CPUs to use if run_parallel is TRUE.

Value

This function returns a list with two slots: pairscan_results and pairscan_perm Each of these elements is also a list containing effect sizes, standard errors, and covariance matrices for the pairwise tests.


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