get.assoc.scores: Get significant SNPs, according to a given test of...

View source: R/get.sig.snps.R

get.assoc.scoresR Documentation

Get significant SNPs, according to a given test of association.

Description

Identify which SNPs are deemed to be significantly associated with a phenotype, according to a given test of association and p-value. (Serves as the treeWAS association testing function; runs the assoc.test function internally.)

Usage

get.assoc.scores(
  snps,
  snps.sim,
  phen,
  tree,
  test = "terminal",
  correct.prop = FALSE,
  categorical = FALSE,
  snps.reconstruction = NULL,
  snps.sim.reconstruction = NULL,
  phen.reconstruction = NULL,
  unique.cols = FALSE
)

Arguments

snps

A matrix containing the real snps.

snps.sim

A matrix or list of matrices containing simulated snps.

phen

A factor or vector containing the phenotype (only allowed to contain two levels for now).

tree

A phylo object containing a phylogenetic tree in which the number of tips is equal to the length of phen and the number of rows of snps and snps.sim.

test

A character string or vector containing one or more of the following available tests of association: "terminal", "simultaneous", "subsequent", "cor", "fisher". By default, the terminal test is run (note that within treeWAS, the first three tests are run in a loop by default). See details for more information on what these tests do and when they may be appropriate.

correct.prop

A logical indicating whether the "terminal" and "subsequent" tests will be corrected for phenotypic class imbalance. Recommended if the proportion of individuals varies significantly across the levels of the phenotype (if binary) or if the phenotype is skewed (if continuous). If correct.prop is FALSE (the default), the original versions of each test will be run as described in our PLOS Computational Biology paper. If TRUE, an alternate association metric (based on the phi correlation coefficient) is calculated across the terminal and all (internal and terminal) nodes, respectively.

categorical

A logical indicating whether phen should be treated as a nominal categorical variable whose unique values should be treated as levels rather than as meaningful numbers.

Author(s)

Caitlin Collins caitiecollins@gmail.com


caitiecollins/treeWAS documentation built on Sept. 9, 2024, 8:23 a.m.