testEdges - Tests for parent-child annotation enchrichment in lineage trees
Description¶
testEdges
performs a permutation test on a set of lineage trees to determine
the significance of an annotation’s association with parent-child relationships.
Usage¶
testEdges(
graphs,
field,
indirect = FALSE,
exclude = c("Germline", NA),
nperm = 200,
progress = FALSE
)
Arguments¶
- graphs
- list of igraph objects with vertex annotations.
- field
- string defining the annotation field to permute.
- indirect
- if
FALSE
count direct connections (edges) only. IfTRUE
walk through any nodes with annotations specified in theargument
to count indirect connections. Specifyingindirect=TRUE
withexclude=NULL
will have no effect. - exclude
- vector of strings defining
field
values to exclude from permutation. - nperm
- number of permutations to perform.
- progress
- if
TRUE
show a progress bar.
Value¶
An EdgeTest object containing the test results and permutation realizations.
Examples¶
# Define example tree set
graphs <- ExampleTrees[1-10]
# Perform edge test on isotypes
x <- testEdges(graphs, "c_call", nperm=10)
print(x)
parent child count expected pvalue
1 IGHA IGHA 39 60.400000 0.9000000
2 IGHA IGHA,IGHG 3 3.200000 0.5000000
3 IGHA IGHG 2 4.400000 0.9000000
4 IGHA,IGHG IGHA 29 10.166667 0.0000000
5 IGHA,IGHG IGHA,IGHG 1 1.333333 0.3333333
6 IGHA,IGHG IGHG 24 4.600000 0.0000000
7 IGHD,IGHG IGHG 8 1.125000 0.0000000
8 IGHG IGHA 1 4.200000 1.0000000
9 IGHG IGHD,IGHG 1 1.000000 0.0000000
10 IGHG IGHG 112 135.700000 1.0000000
See also¶
Uses tableEdges and permuteLabels. See plotEdgeTest for plotting the permutation distributions.