chrVect,
cb_contingency builds and performs a test on a 2 x k
contingency table for the genes from selids found in the child
bands of the given chrVect element. cb_sigBands extracts the chromosome band identifiers that were
in a contingency table that tested significant given the specified
p-value cutoff.
cb_children returns the child bands of a given band in the
chromosome band graph. The argument must have length equal to one.
cb_contingency(selids, chrVect, chrGraph, testFun = chisq.test, min.expected = 5L, min.k = 1L)
cb_sigBands(b, p.value = 0.01)
cb_children(n, chrGraph)graph object as returned by
makeChrBandGraph. The nodes should be chromosome band IDs
and the edges should represent the tree structure of the bands.
Furthermore, the graph is expected to have a "geneIds" node
attribute providing a vector of gene IDs annotated at each band.chisq.test. It will be called with a
single argument, a 2 x k matrix representing the contingency table.(rowSum * colSum) / n. Chromosome bands
with a select cell count less than min.expected are dropped
from the table before testing occurs. If NULL, then no bands
will be dropped.cb_contingencychrGraph will return
character(0) when passed to cb_children.cb_contingency returns a list with an element for each test
performed. This will most often be shorter than
length(chrVect) due to skipped tests based on min.found
and min.k. Each element of the returned list is itself a list
with components:
testFun applied to the table.cb_sigBands returns a character vector of chromosome band
identifiers that are in one of the contingency tables that had a
p-value less than the cutoff specified by p.value.
cb_sigBands assumes that the p-value associated with a result
of testFun can by accessed as testFun(t)$p.value. We
should improve this to be a method call which can then be specialized
based on the class of the object returned by testFun.