Construct a Phylogenetic Tree from a Copy Number Variation (CNV) Matrix
CNVtree.Rd
This function constructs a phylogenetic tree based on a given copy number variation (CNV) matrix. It adds a baseline "Normal" profile only to root the tree, which is not shown in final output. First, it computes pairwise distances between profiles using Euclidean distance, and then applies a specified tree-building function (e.g., Neighbor-Joining) to construct the tree.
Arguments
- cnv_matrix
A matrix representing copy number variation, where rows correspond to samples and columns correspond to genomic regions. Each value represents the CNV at a given region in a sample.
- tree_function
A function to construct the phylogenetic tree from a distance matrix. The default is
nj
(Neighbor-Joining). Other functions (e.g.,upgma
,wpgma
) can also be used.