tree2Clades: Decompose a tree into a presence-absence matrix of samples in...

View source: R/func__tree2Clades.R

tree2CladesR Documentation

Decompose a tree into a presence-absence matrix of samples in each clade of the tree

Description

This function is an adaptation of the tree2patterns function in the BugWAS package for phylix.

Usage

tree2Clades(tr, sample.order)

Arguments

tr

A phylo object of an input tree.

sample.order

A character vector of sample names to reorder tips of the input tree. In practice, the names follow the order in the SNP matrix, the allelic PAM and the projection matrix C.

Author(s)

Yu Wan (wanyuac@126.com)

Examples

assoc <- findPhysLink(...)
clade.pam <- treeToClades(tr = assoc[["C"]][["tr"]], sample.order = rownames(assoc[["C"]][["C"]]))


wanyuac/GeneMates documentation built on Aug. 12, 2022, 7:37 a.m.