selNode: Select branches

Description Usage Arguments Value Author(s) Examples

Description

selNode selects branches meeting the specified criteria in the number of leaves and the count proportion.

Usage

1
2
selNode(obj = NULL, tree = NULL, data = NULL, minTip = 0,
  maxTip = Inf, minPr = 0, maxPr = 1, skip = NULL, all = FALSE)

Arguments

obj

A leafSummarizedExperiment object.

tree

A phylo object

data

A count table from the real data or a list output from parEstimate.

minTip

the minimum number of leaves in the selected branch

maxTip

The maximum number of leaves in the selected branch

minPr

The minimum count proportion of the selected branch in a sample. A value between 0 and 1.

maxPr

The maximum count proportion of the selected branch in a sample. A value between 0 and 1.

skip

A character vector of node labels. These nodes are not the descendants or the ancestors of the selected branch.

all

TRUE or FALSE. Default is FALSE. If FALSE, the branch node of a branch, which meet the requirements and has the minimum count proportion, is returned; otherwise branch nodes of all branches meeting the requirements are returned.

Value

The node whose descendant branch has the lowest proportion

Author(s)

Ruizhu Huang

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
set.seed(1)
data("tinyTree")
toyTable <- matrix(rnbinom(40, size = 1, mu = 10), nrow = 10)
colnames(toyTable) <- paste(rep(LETTERS[1:2], each = 2),
rep(1:2, 2), sep = "_")
rownames(toyTable) <- tinyTree$tip.label


dat <- parEstimate(data = toyTable)
(out1 <- selNode(tree = tinyTree, data = dat, all = TRUE))
(out2 <- selNode(tree = tinyTree, data = dat, minTip = 4, maxTip = 9,
minPr = 0, maxPr = 0.8, all = TRUE))

## provide obj
lse1 <- leafSummarizedExperiment(tree = tinyTree,
                                assays = list(toyTable))
out <- selNode(obj = lse1, all = TRUE)

markrobinsonuzh/treeAGG documentation built on May 26, 2019, 9:32 a.m.