as.garnett: Converts a classification tree to a garnett output

Description Usage Arguments Value Methods (by generic) Examples

View source: R/print_tree_rules.R

Description

Converts a fitted ctree object to the classifier format supported by garnett for more information on the specification please visit: https://cole-trapnell-lab.github.io/garnett/docs/#submitting-a-classifier

Usage

1
2
3
4
as.garnett(tree, digits = 3, rules_keep = ".*")

## S3 method for class 'garnett.list'
print(x)

Arguments

tree

a fitted constparty/party object

digits

an integer stating how many decimal places should be conserved

rules_keep

a regular expression stating which rules should be kept, defaults to all rules (".*")

Value

a complex list that prints as a garnett file

Methods (by generic)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
as.garnett(fit_ctree(Seurat::pbmc_small))
# > 0_node_2 	(n = 52)
# expressed below: S100A8 2.523
# 
# > 0_node_4 	(n = 7)
# expressed above: S100A8 2.523
# expressed below: S100A9 0
# 
# > 1 	(n = 21)
# expressed above: S100A8 2.523, S100A9 0

jspaezp/sctree documentation built on April 30, 2020, 10:36 p.m.