local_test_factory: Local and Global Test Function Factories

View source: R/cb_test.R

local_test_factoryR Documentation

Local and Global Test Function Factories

Description

These functions return functions appropriate for use as the tfun argument to topdown_tree_visitor or bottomup_tree_visitor. In particular, it is these functions that are associated with the "local" and "global" options for the type argument to cb_test.

Usage

local_test_factory(selids, tableTest = chisq.test)
hg_test_factory(selids, PCUT = 0.05, COND = FALSE, OVER = TRUE)

Arguments

selids

A vector of gene IDs. The IDs should match those used to annotatate the ChrBandTree given by chrtree. In most cases, these will be Entrez Gene IDs.

tableTest

A contingency table testing function. The behavior of this function must be reasonably close to that of chisq.test.

PCUT

A p-value cutoff that will be used to determine if a given test is significant or not when using hg_test_factory with COND=TRUE.

COND

A logical value indicating whether a conditional test should be performed.

OVER

If TRUE, test for over representation, if FALSE, test for under representation.

Details

The returned functions have signature f(start, g, prev_ans) where start is a vector of start nodes, g is a chromosome band tree graph, and prev_ans can contain the previous result returned by a call to this function.

Value

A function that can be used as the tfun argument to the tree visitor functions.

Author(s)

Seth Falcon

See Also

cb_test


Bioconductor/Category documentation built on Nov. 2, 2024, 6:33 a.m.