getPermsBinaryExtantOnly: Calculates permuted correlation and enrichment statistics for...

View source: R/PermulationFuncs.R

getPermsBinaryExtantOnlyR Documentation

Calculates permuted correlation and enrichment statistics for binary phenotype when performing an extant only analysis

Description

Calculates permuted correlation and enrichment statistics for binary phenotype when performing an extant only analysis

Usage

getPermsBinaryExtantOnly(
  numperms,
  fg_vec,
  sisters_list,
  root_sp,
  RERmat,
  trees,
  mastertree,
  permmode = "cc",
  method = "k",
  min.pos = 2,
  trees_list = NULL,
  calculateenrich = F,
  annotlist = NULL
)

Arguments

numperms

An integer number of permulations

fg_vec

A vector containing the tip foreground species

sisters_list

A list containing pairs of "sister species" in the foreground set (put NULL if empty)

root_sp

The species to root the tree on

RERmat

An RER matrix calculated using getAllResiduals.

trees

treesObj from readTrees

mastertree

A rooted, fully dichotomous tree derived from the treesObj master tree from readTrees. Must not contain species not in traitvec

permmode

Mode of binary permulation ("cc" for Complete Cases (default), "ssm" for Species Subset Match)

method

statistical method to use for correlations (set to "k" (default) for Kendall Tau test)

min.pos

minimum number of foreground species (default 2)

trees_list

A list containing the trees of all genes of interest (formatted like trees in treesObj from readTrees)

calculateenrich

A boolean variable indicating if null permulation p-values for enrichment statistics

annotlist

Pathway annotations

Value

A list object with enrichment statistics, correlation p-val, rho, and correlation effect size


nclark-lab/RERconverge documentation built on March 2, 2024, 8:51 a.m.