Skip to contents

A simple wrapper function designed to allow users to easliy run LOCATER in conjunction with kalis.

Usage

TestLoci(
  y,
  pars,
  target.loci = 1:L(),
  A = NULL,
  test.opts = list(),
  verbose = FALSE,
  num.ckpts = 0L,
  ckpt.first.locus = FALSE,
  use.forking = FALSE,
  nthreads = 1L
)

Arguments

y

a n x m matrix of m quantitative phenotypes (one phenotype / column)

pars

a kalisParameters object specifing HMM parameters to the Li and Stephens HMM as returned by kalis::Parameters

target.loci

a vector of integers specifying index of variants among those cached with kalis::CacheHaplotypes to be screened with LOCATER

A

a n x q matrix of q background covariates (an intercept – column of 1s – should be included). Just an intercept by default.

test.opts

a list of testing options that can customized the behavior of TestLoci (further documentation coming)

verbose

a logical, if TRUE print progress statements as TestLoci progresses

num.ckpts

an integer, the number of checkpoints that can be stored in memory. default = 0. Increasing even to just `2L` or `3L` yields significant speed ups.

ckpt.first.locus

a logical, should the first target locus be stored as a checkpoint. Default is FALSE but if the first target locus is very far from start of the cached chromosome, TRUE may yield an acceleration.

use.forking

a logical, is multiprocessing by process forking allowed? Some relatively minor acclerations are possible if TRUE, but users should verify that it is safe to launch forked processes on their compute cluster.

nthreads

an integer, number of threads available

Value

a data.table with one row per target locus including the following key fields

  • locus.idx: the index of corresponding variant (corresponding to target.loci)

  • phenotype: the phenotype tested (given a column index of y )

  • tot: LOCATER -log10 p-value

  • smt: -log10 p-value from single marker testing

  • rd: -log10 p-value returned by running Stable Distillation

  • qform: -log10 p-value returned by quadratic form testing