get_largest_subtree: Get largest pure subtrees

Description Usage Arguments Value

View source: R/check_clustering_on_tree.R

Description

Get largest pure subtrees

Usage

1
2
3
4
5
6
7
get_largest_subtree(
  subtrs,
  isolate_labels,
  control_labels = NULL,
  bootstrap = 90,
  pureness = 1
)

Arguments

subtrs

Subtrees created using ape::subtrees to look for clustering on. Should include all isolates of interest.

isolate_labels

Named vector of labels by which pure clusters are defined. Names must be equivalent to tree tip label names.

control_labels

Named vector of labels known to cluster. Names must be equivalent to tree tip label names. This controls for clustering by requiring that the pure clusters must contain multiple of the control labels.

bootstrap

Bootstrap support to use to filter unconfident tree edges (keeps > bootstrap; NULL = keep all; default: 90).

pureness

How pure the subtree has to be to call it a "pure" subtree (default: 1; range 0-1).

Value

list containing the largest pure subtree that each isolate belongs to, the index of that subtree, and the edges in that subtree.


Snitkin-Lab-Umich/snitkitr documentation built on April 21, 2021, 10:48 a.m.