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

View source: R/PermulationFuncs.R

getPermsBinaryFudgedR Documentation

Calculates permuted correlation and enrichment statistics for binary phenotype (does not enforce matching structure of sister species, but maintains internal & tips foreground counts within a fudge of the original tree)

Description

Calculates permuted correlation and enrichment statistics for binary phenotype (does not enforce matching structure of sister species, but maintains internal & tips foreground counts within a fudge of the original tree)

Usage

getPermsBinaryFudged(
  fgdspecs,
  RERs,
  trees,
  useSpecies,
  ntrees,
  root,
  fudge = 5,
  cors,
  phenvec
)

Arguments

fgdspecs

A vector containing the tip foreground species

RERs

An RER matrix calculated using getAllResiduals.

trees

treesObj from readTrees

useSpecies

A vector of species to include

ntrees

An integer number of permulations

root

The species to root the tree on

fudge

The number up to which the permulated tree can differ in total foreground species

cors

The gene correlation results from correlateWithBinaryPhenotype

phenvec

A named vector of the phenotype

Value

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


nclark-lab/RERconverge documentation built on June 9, 2025, 6:02 a.m.